ui-mathilde-web 0.13.6 → 0.13.7

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.
@@ -647,6 +647,7 @@ declare interface InputFormProps extends default_2.InputHTMLAttributes<HTMLInput
647
647
  min?: number | string;
648
648
  max?: number | string;
649
649
  maxLength?: number;
650
+ id?: string;
650
651
  }
651
652
 
652
653
  export declare const Label: {
@@ -10629,8 +10629,9 @@ const Ps = Re(
10629
10629
  maxLength: s,
10630
10630
  onChange: i,
10631
10631
  classLabel: l,
10632
- ...c
10633
- }, d) => /* @__PURE__ */ W("div", { className: `${r ? "mb-3" : ""}`, children: [
10632
+ id: c,
10633
+ ...d
10634
+ }, u) => /* @__PURE__ */ W("div", { className: `${r ? "mb-3" : ""}`, children: [
10634
10635
  r && /* @__PURE__ */ g("label", { className: `mb-1 block font-semibold ${l ?? ""}`, children: r }),
10635
10636
  t === !0 ? /* @__PURE__ */ g(
10636
10637
  Qo,
@@ -10638,13 +10639,13 @@ const Ps = Re(
10638
10639
  className: `${a}`,
10639
10640
  sizing: "sm",
10640
10641
  maxLength: s,
10641
- ref: d,
10642
+ ref: u,
10642
10643
  type: o,
10643
10644
  rightIcon: () => /* @__PURE__ */ g($1, { size: 17, "aria-label": "search" }),
10644
10645
  placeholder: e,
10645
10646
  onChange: i,
10646
- id: "search-input",
10647
- ...c
10647
+ id: c,
10648
+ ...d
10648
10649
  }
10649
10650
  ) : /* @__PURE__ */ g(
10650
10651
  Qo,
@@ -10652,12 +10653,12 @@ const Ps = Re(
10652
10653
  className: `${a}`,
10653
10654
  sizing: "sm",
10654
10655
  maxLength: s,
10655
- ref: d,
10656
+ ref: u,
10656
10657
  type: o,
10657
10658
  placeholder: e,
10658
10659
  onChange: i,
10659
- id: "input",
10660
- ...c
10660
+ id: c,
10661
+ ...d
10661
10662
  }
10662
10663
  ),
10663
10664
  n && /* @__PURE__ */ g("p", { className: "mt-1 text-xs text-red-500", children: n })
@@ -5,7 +5,7 @@
5
5
  */(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var o="",a=0;a<arguments.length;a++){var i=arguments[a];i&&(o=s(o,r(i)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var a="";for(var i in o)e.call(o,i)&&o[i]&&(a=s(a,i));return a}function s(o,a){return a?o?o+" "+a:o+a:o}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(Vh);var ur=Vh.exports;const Mk=zh(ur);var Oc={exports:{}};function Yh(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,o,a,i,l;function c(){const u=Date.now()-i;if(u<e&&u>=0)a=setTimeout(c,e-u);else if(a=void 0,!r){const g=s,h=o;s=void 0,o=void 0,l=t.apply(g,h)}}const d=function(...u){if(s&&this!==s)throw new Error("Debounced method called with different contexts.");s=this,o=u,i=Date.now();const g=r&&!a;if(a||(a=setTimeout(c,e)),g){const h=s,m=o;s=void 0,o=void 0,l=t.apply(h,m)}return l};return d.clear=()=>{a&&(clearTimeout(a),a=void 0)},d.flush=()=>{if(!a)return;const u=s,g=o;s=void 0,o=void 0,l=t.apply(u,g),clearTimeout(a),a=void 0},d}Oc.exports.debounce=Yh,Oc.exports=Yh;var Ok=Oc.exports;const Dk=zh(Ok);var Ek=Object.defineProperty,Tk=(t,e,n)=>e in t?Ek(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ct=(t,e,n)=>(Tk(t,typeof e!="symbol"?e+"":e,n),n);const Pk=300,Nk=0;class jk extends _.PureComponent{constructor(e){super(e),ct(this,"container"),ct(this,"scrolling"),ct(this,"started"),ct(this,"pressed"),ct(this,"isMobile",!1),ct(this,"internal"),ct(this,"scrollLeft"),ct(this,"scrollTop"),ct(this,"clientX"),ct(this,"clientY"),ct(this,"onEndScroll",()=>{this.scrolling=!1,!this.pressed&&this.started&&this.processEnd()}),ct(this,"onScroll",()=>{const n=this.container.current;(n.scrollLeft!==this.scrollLeft||n.scrollTop!==this.scrollTop)&&(this.scrolling=!0,this.processScroll(),this.onEndScroll())}),ct(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()}}),ct(this,"onTouchEnd",()=>{const{nativeMobileScroll:n}=this.props;this.pressed&&(this.started&&(!this.scrolling||!n)?this.processEnd():this.pressed=!1,this.forceUpdate())}),ct(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()}}),ct(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()))}),ct(this,"onMouseMove",n=>{this.pressed&&(this.processMove(n.clientX,n.clientY),n.preventDefault(),this.props.stopPropagation&&n.stopPropagation())}),ct(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=Dk(this.onEndScroll,Pk),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:o,onScroll:a}=this.props,i=this.container.current;this.started?(r&&(i.scrollLeft-=e-this.clientX),s&&(i.scrollTop-=n-this.clientY),a&&a({external:!this.internal}),this.clientX=e,this.clientY=n,this.scrollLeft=i.scrollLeft,this.scrollTop=i.scrollTop):(r&&Math.abs(e-this.clientX)>o||s&&Math.abs(n-this.clientY)>o)&&(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:o}=this.props;return f.jsx("div",{className:Mk(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]":o,"[&::-webkit-scrollbar]:[-webkit-appearance:none !important] [&::-webkit-scrollbar]:!hidden [&::-webkit-scrollbar]:!h-0 [&::-webkit-scrollbar]:!w-0 [&::-webkit-scrollbar]:!bg-transparent":o}),style:s,ref:this.getRef,onScroll:this.onScroll,children:e})}}ct(jk,"defaultProps",{nativeMobileScroll:!0,hideScrollbars:!0,activationDistance:10,vertical:!0,horizontal:!0,stopPropagation:!1,style:{},buttons:[Nk]});const Co=_.forwardRef(({className:t,color:e="default",theme:n={},...r},s)=>{const o=re(pe().checkbox,n);return f.jsx("input",{ref:s,type:"checkbox",className:Q(o.root.base,o.root.color[e],t),...r})});Co.displayName="Checkbox";const So=({children:t,className:e,color:n="default",theme:r={},value:s,...o})=>{const a=re(pe().helperText,r);return f.jsx("p",{className:Q(a.root.base,a.root.colors[n],e),...o,children:s??t??""})};So.displayName="HelperText";const xs=_.forwardRef(({addon:t,className:e,color:n="gray",helperText:r,icon:s,rightIcon:o,shadow:a,sizing:i="md",theme:l={},type:c="text",...d},u)=>{const g=re(pe().textInput,l);return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:Q(g.base,e),children:[t&&f.jsx("span",{className:g.addon,children:t}),f.jsxs("div",{className:g.field.base,children:[s&&f.jsx("div",{className:g.field.icon.base,children:f.jsx(s,{className:g.field.icon.svg})}),o&&f.jsx("div",{"data-testid":"right-icon",className:g.field.rightIcon.base,children:f.jsx(o,{className:g.field.rightIcon.svg})}),f.jsx("input",{className:Q(g.field.input.base,g.field.input.colors[n],g.field.input.sizes[i],g.field.input.withIcon[s?"on":"off"],g.field.input.withRightIcon[o?"on":"off"],g.field.input.withAddon[t?"on":"off"],g.field.input.withShadow[a?"on":"off"]),type:c,...d,ref:u})]})]}),r&&f.jsx(So,{color:n,children:r})]})});xs.displayName="TextInput";const Uh=_.createContext(void 0);function Ga(){const t=_.useContext(Uh);if(!t)throw new Error("useDatePickerContext should be used within the DatePickerContext provider!");return t}var Ge=(t=>(t[t.Days=0]="Days",t[t.Months=1]="Months",t[t.Years=2]="Years",t[t.Decades=3]="Decades",t))(Ge||{}),Gh=(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))(Gh||{});const Mo=(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(),o=new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime();return r>=s&&r<=o}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},Xa=(t,e)=>(t=new Date(t.getFullYear(),t.getMonth(),t.getDate()),e=new Date(e.getFullYear(),e.getMonth(),e.getDate()),t.getTime()===e.getTime()),Ik=(t,e,n)=>(Mo(t,e,n)||(e&&t<e?t=e:n&&t>n&&(t=n)),t),Ak=(t,e)=>{const n=new Date(t.getFullYear(),t.getMonth(),1);let s=n.getDay()-e;return s<0&&(s+=7),Dc(n,-s)},Lk=(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 o=0;o<7;o++)n.push(s.format(Dc(r,o)));return n},Dc=(t,e)=>{const n=new Date(t);return n.setDate(n.getDate()+e),n},Rk=(t,e)=>{const n=new Date(t);return n.setMonth(n.getMonth()+e),n},ks=(t,e)=>{const n=new Date(t);return n.setFullYear(n.getFullYear()+e),n},Oo=(t,e,n)=>{let r={day:"numeric",month:"long",year:"numeric"};return n&&(r=n),new Intl.DateTimeFormat(t,r).format(e)},_s=(t,e)=>{const n=t.getFullYear();return Math.floor(n/e)*e},Fk=(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:o,selectedDate:a,changeSelectedDate:i,language:l}=Ga(),c=re(e.views.days,t),d=Lk(l,n),u=Ak(o,n);return f.jsxs(f.Fragment,{children:[f.jsx("div",{className:c.header.base,children:d.map((g,h)=>f.jsx("span",{className:c.header.title,children:g},h))}),f.jsx("div",{className:c.items.base,children:[...Array(42)].map((g,h)=>{const m=Dc(u,h),p=Oo(l,m,{day:"numeric"}),b=Xa(a,m),y=!Mo(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},h)})})]})},Wk=({theme:t={}})=>{const{theme:e,selectedDate:n,viewDate:r,setViewDate:s,setView:o}=Ga(),a=re(e.views.decades,t);return f.jsx("div",{className:a.items.base,children:[...Array(12)].map((i,l)=>{const d=_s(r,100)-10+l*10,u=new Date(d,0,1),g=ks(u,9),h=Fk(r,d),m=!Mo(r,u,g);return f.jsx("button",{disabled:m,type:"button",className:Q(a.items.item.base,h&&a.items.item.selected,m&&a.items.item.disabled),onClick:()=>{m||(s(ks(r,d-n.getFullYear())),o(Ge.Years))},children:d},l)})})},zk=({theme:t={}})=>{const{theme:e,minDate:n,maxDate:r,selectedDate:s,viewDate:o,language:a,setViewDate:i,setView:l}=Ga(),c=re(e.views.months,t);return f.jsx("div",{className:c.items.base,children:[...Array(12)].map((d,u)=>{const g=new Date(o.getTime());g.setMonth(u);const h=Oo(a,g,{month:"short"}),m=Xa(s,g),p=!Mo(g,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(g),l(Ge.Days))},children:h},u)})})},Hk=({theme:t={}})=>{const{theme:e,selectedDate:n,minDate:r,maxDate:s,viewDate:o,setViewDate:a,setView:i}=Ga(),l=re(e.views.years,t);return f.jsx("div",{className:l.items.base,children:[...Array(12)].map((c,d)=>{const g=_s(o,10)-1+d*1,h=new Date(o.getTime());h.setFullYear(g);const m=Xa(n,h),p=!Mo(h,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||(a(h),i(Ge.Months))},children:g},d)})})},Vk=({title:t,open:e,inline:n=!1,autoHide:r=!0,showClearButton:s=!0,labelClearButton:o="Clear",showTodayButton:a=!0,labelTodayButton:i="Today",defaultDate:l=new Date,minDate:c,maxDate:d,language:u="en",weekStart:g=Gh.Sunday,className:h,theme:m={},onSelectedDateChanged:p,...b},y)=>{const x=re(pe().datepicker,m);l=Ik(l,c,d);const[k,v]=_.useState(e),[w,C]=_.useState(Ge.Days),[N,T]=_.useState(l),[I,D]=_.useState(l),z=_.useRef(null),L=_.useRef(null),P=(X,j)=>{T(X),p&&p(X),r&&w===Ge.Days&&j==!0&&!n&&v(!1)},M=()=>{P(l,!0),l&&D(l)};_.useImperativeHandle(y,()=>({focus(){var X;(X=z.current)==null||X.focus()},clear(){M()}}));const E=X=>{switch(X){case Ge.Decades:return f.jsx(Wk,{theme:x.views.decades});case Ge.Years:return f.jsx(Hk,{theme:x.views.years});case Ge.Months:return f.jsx(zk,{theme:x.views.months});case Ge.Days:default:return f.jsx(Bk,{theme:x.views.days})}},S=()=>{switch(w){case Ge.Days:return Ge.Months;case Ge.Months:return Ge.Years;case Ge.Years:return Ge.Decades}return w},B=()=>{switch(w){case Ge.Decades:return`${_s(I,100)} - ${_s(I,100)+90}`;case Ge.Years:return`${_s(I,10)} - ${_s(I,10)+9}`;case Ge.Months:return Oo(u,I,{year:"numeric"});case Ge.Days:default:return Oo(u,I,{month:"long",year:"numeric"})}},W=(X,j,V)=>{switch(X){case Ge.Days:return new Date(Rk(j,V));case Ge.Months:return new Date(ks(j,V));case Ge.Years:return new Date(ks(j,V*10));case Ge.Decades:return new Date(ks(j,V*100));default:return new Date(ks(j,V*10))}};return _.useEffect(()=>{const X=j=>{var R,F;const V=(R=L==null?void 0:L.current)==null?void 0:R.contains(j.target),A=(F=z==null?void 0:z.current)==null?void 0:F.contains(j.target);!V&&!A&&v(!1)};return document.addEventListener("mousedown",X),()=>{document.removeEventListener("mousedown",X)}},[z,L,v]),f.jsx(Uh.Provider,{value:{theme:x,language:u,minDate:c,maxDate:d,weekStart:g,isOpen:k,setIsOpen:v,view:w,setView:C,viewDate:I,setViewDate:D,selectedDate:N,setSelectedDate:T,changeSelectedDate:P},children:f.jsxs("div",{className:Q(x.root.base,h),children:[!n&&f.jsx(xs,{theme:x.root.input,icon:J2,ref:z,onFocus:()=>{Xa(I,N)||D(N),v(!0)},value:N&&Oo(u,N),readOnly:!0,...b}),(k||n)&&f.jsx("div",{ref:L,className:Q(x.popup.root.base,n&&x.popup.root.inline),children:f.jsxs("div",{className:x.popup.root.inner,children:[f.jsxs("div",{className:x.popup.header.base,children:[t&&f.jsx("div",{className:x.popup.header.title,children:t}),f.jsxs("div",{className:x.popup.header.selectors.base,children:[f.jsx("button",{type:"button",className:Q(x.popup.header.selectors.button.base,x.popup.header.selectors.button.prev),onClick:()=>D(W(w,I,-1)),children:f.jsx(Z2,{})}),f.jsx("button",{type:"button",className:Q(x.popup.header.selectors.button.base,x.popup.header.selectors.button.view),onClick:()=>C(S()),children:B()}),f.jsx("button",{type:"button",className:Q(x.popup.header.selectors.button.base,x.popup.header.selectors.button.next),onClick:()=>D(W(w,I,1)),children:f.jsx(Q2,{})})]})]}),f.jsx("div",{className:x.popup.view.base,children:E(w)}),(s||a)&&f.jsxs("div",{className:x.popup.footer.base,children:[a&&f.jsx("button",{type:"button",className:Q(x.popup.footer.button.base,x.popup.footer.button.today),onClick:()=>{const X=new Date;P(X,!0),D(X)},children:i}),s&&f.jsx("button",{type:"button",className:Q(x.popup.footer.button.base,x.popup.footer.button.clear),onClick:()=>{P(l,!0),l&&D(l)},children:o})]})]})})]})})},Xh=_.forwardRef(Vk);Xh.displayName="Datepicker";function Ka(){return typeof window<"u"}function Rr(t){return Kh(t)?(t.nodeName||"").toLowerCase():"#document"}function Nt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function yn(t){var e;return(e=(Kh(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Kh(t){return Ka()?t instanceof Node||t instanceof Nt(t).Node:!1}function Ae(t){return Ka()?t instanceof Element||t instanceof Nt(t).Element:!1}function bt(t){return Ka()?t instanceof HTMLElement||t instanceof Nt(t).HTMLElement:!1}function Ec(t){return!Ka()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Nt(t).ShadowRoot}function Do(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=tn(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(s)}function Yk(t){return["table","td","th"].includes(Rr(t))}function Za(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Tc(t){const e=Pc(),n=Ae(t)?tn(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 Uk(t){let e=Vn(t);for(;bt(e)&&!fr(e);){if(Tc(e))return e;if(Za(e))return null;e=Vn(e)}return null}function Pc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function fr(t){return["html","body","#document"].includes(Rr(t))}function tn(t){return Nt(t).getComputedStyle(t)}function Qa(t){return Ae(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Vn(t){if(Rr(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ec(t)&&t.host||yn(t);return Ec(e)?e.host:e}function Zh(t){const e=Vn(t);return fr(e)?t.ownerDocument?t.ownerDocument.body:t.body:bt(e)&&Do(e)?e:Zh(e)}function hr(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=Zh(t),o=s===((r=t.ownerDocument)==null?void 0:r.body),a=Nt(s);if(o){const i=Nc(a);return e.concat(a,a.visualViewport||[],Do(s)?s:[],i&&n?hr(i):[])}return e.concat(s,hr(s,[],n))}function Nc(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function wn(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 st(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 jc(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function Qh(){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 Jh(t){return t.mozInputSource===0&&t.isTrusted?!0:Lc()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function Ic(t){return Gk()?!1:!Lc()&&t.width===0&&t.height===0||Lc()&&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 Ac(){return/apple/i.test(navigator.vendor)}function Lc(){const t=/android/i;return t.test(jc())||t.test(Qh())}function qh(){return jc().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Gk(){return Qh().includes("jsdom/")}function Ja(t,e){const n=["mouse","pen"];return e||n.push("",void 0),n.includes(t)}function Xk(t){return"nativeEvent"in t}function Kk(t){return t.matches("html,body")}function Ot(t){return(t==null?void 0:t.ownerDocument)||document}function Rc(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 gr(t){return"composedPath"in t?t.composedPath()[0]:t.target}const Zk="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Fc(t){return bt(t)&&t.matches(Zk)}function yt(t){t.preventDefault(),t.stopPropagation()}function $h(t){return t?t.getAttribute("role")==="combobox"&&Fc(t):!1}const Qk=["top","right","bottom","left"],e0=["start","end"],t0=Qk.reduce((t,e)=>t.concat(e,e+"-"+e0[0],e+"-"+e0[1]),[]),Cs=Math.min,Fr=Math.max,qa=Math.round,Ss=Math.floor,vn=t=>({x:t,y:t}),Jk={left:"right",right:"left",bottom:"top",top:"bottom"},qk={start:"end",end:"start"};function Bc(t,e,n){return Fr(t,Cs(e,n))}function Ms(t,e){return typeof t=="function"?t(e):t}function Yn(t){return t.split("-")[0]}function xn(t){return t.split("-")[1]}function n0(t){return t==="x"?"y":"x"}function Wc(t){return t==="y"?"height":"width"}function $a(t){return["top","bottom"].includes(Yn(t))?"y":"x"}function zc(t){return n0($a(t))}function r0(t,e,n){n===void 0&&(n=!1);const r=xn(t),s=zc(t),o=Wc(s);let a=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(a=ti(a)),[a,ti(a)]}function $k(t){const e=ti(t);return[ei(t),e,ei(e)]}function ei(t){return t.replace(/start|end/g,e=>qk[e])}function e5(t,e,n){const r=["left","right"],s=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return n?e?s:r:e?r:s;case"left":case"right":return e?o:a;default:return[]}}function t5(t,e,n,r){const s=xn(t);let o=e5(Yn(t),n==="start",r);return s&&(o=o.map(a=>a+"-"+s),e&&(o=o.concat(o.map(ei)))),o}function ti(t){return t.replace(/left|right|bottom|top/g,e=>Jk[e])}function n5(t){return{top:0,right:0,bottom:0,left:0,...t}}function s0(t){return typeof t!="number"?n5(t):{top:t,right:t,bottom:t,left:t}}function ni(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 o0(t,e,n){let{reference:r,floating:s}=t;const o=$a(e),a=zc(e),i=Wc(a),l=Yn(e),c=o==="y",d=r.x+r.width/2-s.width/2,u=r.y+r.height/2-s.height/2,g=r[i]/2-s[i]/2;let h;switch(l){case"top":h={x:d,y:r.y-s.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:u};break;case"left":h={x:r.x-s.width,y:u};break;default:h={x:r.x,y:r.y}}switch(xn(e)){case"start":h[a]-=g*(n&&c?-1:1);break;case"end":h[a]+=g*(n&&c?-1:1);break}return h}const r5=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:a}=n,i=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:s}),{x:d,y:u}=o0(c,r,l),g=r,h={},m=0;for(let p=0;p<i.length;p++){const{name:b,fn:y}=i[p],{x,y:k,data:v,reset:w}=await y({x:d,y:u,initialPlacement:r,placement:g,strategy:s,middlewareData:h,rects:c,platform:a,elements:{reference:t,floating:e}});d=x??d,u=k??u,h={...h,[b]:{...h[b],...v}},w&&m<=50&&(m++,typeof w=="object"&&(w.placement&&(g=w.placement),w.rects&&(c=w.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:s}):w.rects),{x:d,y:u}=o0(c,g,l)),p=-1)}return{x:d,y:u,placement:g,strategy:s,middlewareData:h}};async function Hc(t,e){var n;e===void 0&&(e={});const{x:r,y:s,platform:o,rects:a,elements:i,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:g=!1,padding:h=0}=Ms(e,t),m=s0(h),b=i[g?u==="floating"?"reference":"floating":u],y=ni(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(b)))==null||n?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(i.floating)),boundary:c,rootBoundary:d,strategy:l})),x=u==="floating"?{...a.floating,x:r,y:s}:a.reference,k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(i.floating)),v=await(o.isElement==null?void 0:o.isElement(k))?await(o.getScale==null?void 0:o.getScale(k))||{x:1,y:1}:{x:1,y:1},w=ni(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:x,offsetParent:k,strategy:l}):x);return{top:(y.top-w.top+m.top)/v.y,bottom:(w.bottom-y.bottom+m.bottom)/v.y,left:(y.left-w.left+m.left)/v.x,right:(w.right-y.right+m.right)/v.x}}const s5=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:o,platform:a,elements:i,middlewareData:l}=e,{element:c,padding:d=0}=Ms(t,e)||{};if(c==null)return{};const u=s0(d),g={x:n,y:r},h=zc(s),m=Wc(h),p=await a.getDimensions(c),b=h==="y",y=b?"top":"left",x=b?"bottom":"right",k=b?"clientHeight":"clientWidth",v=o.reference[m]+o.reference[h]-g[h]-o.floating[m],w=g[h]-o.reference[h],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let N=C?C[k]:0;(!N||!await(a.isElement==null?void 0:a.isElement(C)))&&(N=i.floating[k]||o.floating[m]);const T=v/2-w/2,I=N/2-p[m]/2-1,D=Cs(u[y],I),z=Cs(u[x],I),L=D,P=N-p[m]-z,M=N/2-p[m]/2+T,E=Bc(L,M,P),S=!l.arrow&&xn(s)!=null&&M!==E&&o.reference[m]/2-(M<L?D:z)-p[m]/2<0,B=S?M<L?M-L:M-P:0;return{[h]:g[h]+B,data:{[h]:E,centerOffset:M-E-B,...S&&{alignmentOffset:B}},reset:S}}});function o5(t,e,n){return(t?[...n.filter(s=>xn(s)===t),...n.filter(s=>xn(s)!==t)]:n.filter(s=>Yn(s)===s)).filter(s=>t?xn(s)===t||(e?ei(s)!==s:!1):!0)}const a5=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,r,s;const{rects:o,middlewareData:a,placement:i,platform:l,elements:c}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:g=t0,autoAlignment:h=!0,...m}=Ms(t,e),p=u!==void 0||g===t0?o5(u||null,h,g):g,b=await Hc(e,m),y=((n=a.autoPlacement)==null?void 0:n.index)||0,x=p[y];if(x==null)return{};const k=r0(x,o,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(i!==x)return{reset:{placement:p[0]}};const v=[b[Yn(x)],b[k[0]],b[k[1]]],w=[...((r=a.autoPlacement)==null?void 0:r.overflows)||[],{placement:x,overflows:v}],C=p[y+1];if(C)return{data:{index:y+1,overflows:w},reset:{placement:C}};const N=w.map(D=>{const z=xn(D.placement);return[D.placement,z&&d?D.overflows.slice(0,2).reduce((L,P)=>L+P,0):D.overflows[0],D.overflows]}).sort((D,z)=>D[1]-z[1]),I=((s=N.filter(D=>D[2].slice(0,xn(D[0])?2:3).every(z=>z<=0))[0])==null?void 0:s[0])||N[0][0];return I!==i?{data:{index:y+1,overflows:w},reset:{placement:I}}:{}}}},i5=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:s,middlewareData:o,rects:a,initialPlacement:i,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:g,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...b}=Ms(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const y=Yn(s),x=Yn(i)===i,k=await(l.isRTL==null?void 0:l.isRTL(c.floating)),v=g||(x||!p?[ti(i)]:$k(i));!g&&m!=="none"&&v.push(...t5(i,p,m,k));const w=[i,...v],C=await Hc(e,b),N=[];let T=((r=o.flip)==null?void 0:r.overflows)||[];if(d&&N.push(C[y]),u){const L=r0(s,a,k);N.push(C[L[0]],C[L[1]])}if(T=[...T,{placement:s,overflows:N}],!N.every(L=>L<=0)){var I,D;const L=(((I=o.flip)==null?void 0:I.index)||0)+1,P=w[L];if(P)return{data:{index:L,overflows:T},reset:{placement:P}};let M=(D=T.filter(E=>E.overflows[0]<=0).sort((E,S)=>E.overflows[1]-S.overflows[1])[0])==null?void 0:D.placement;if(!M)switch(h){case"bestFit":{var z;const E=(z=T.map(S=>[S.placement,S.overflows.filter(B=>B>0).reduce((B,W)=>B+W,0)]).sort((S,B)=>S[1]-B[1])[0])==null?void 0:z[0];E&&(M=E);break}case"initialPlacement":M=i;break}if(s!==M)return{reset:{placement:M}}}return{}}}};async function l5(t,e){const{placement:n,platform:r,elements:s}=t,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),a=Yn(n),i=xn(n),l=$a(n)==="y",c=["left","top"].includes(a)?-1:1,d=o&&l?-1:1,u=Ms(e,t);let{mainAxis:g,crossAxis:h,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return i&&typeof m=="number"&&(h=i==="end"?m*-1:m),l?{x:h*d,y:g*c}:{x:g*c,y:h*d}}const c5=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:o,placement:a,middlewareData:i}=e,l=await l5(e,t);return a===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:a}}}}},d5=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:i={fn:b=>{let{x:y,y:x}=b;return{x:y,y:x}}},...l}=Ms(t,e),c={x:n,y:r},d=await Hc(e,l),u=$a(Yn(s)),g=n0(u);let h=c[g],m=c[u];if(o){const b=g==="y"?"top":"left",y=g==="y"?"bottom":"right",x=h+d[b],k=h-d[y];h=Bc(x,h,k)}if(a){const b=u==="y"?"top":"left",y=u==="y"?"bottom":"right",x=m+d[b],k=m-d[y];m=Bc(x,m,k)}const p=i.fn({...e,[g]:h,[u]:m});return{...p,data:{x:p.x-n,y:p.y-r}}}}};function a0(t){const e=tn(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=bt(t),o=s?t.offsetWidth:n,a=s?t.offsetHeight:r,i=qa(n)!==o||qa(r)!==a;return i&&(n=o,r=a),{width:n,height:r,$:i}}function Vc(t){return Ae(t)?t:t.contextElement}function Os(t){const e=Vc(t);if(!bt(e))return vn(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:o}=a0(e);let a=(o?qa(n.width):n.width)/r,i=(o?qa(n.height):n.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const u5=vn(0);function i0(t){const e=Nt(t);return!Pc()||!e.visualViewport?u5:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function f5(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Nt(t)?!1:e}function Br(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),o=Vc(t);let a=vn(1);e&&(r?Ae(r)&&(a=Os(r)):a=Os(t));const i=f5(o,n,r)?i0(o):vn(0);let l=(s.left+i.x)/a.x,c=(s.top+i.y)/a.y,d=s.width/a.x,u=s.height/a.y;if(o){const g=Nt(o),h=r&&Ae(r)?Nt(r):r;let m=g,p=Nc(m);for(;p&&r&&h!==m;){const b=Os(p),y=p.getBoundingClientRect(),x=tn(p),k=y.left+(p.clientLeft+parseFloat(x.paddingLeft))*b.x,v=y.top+(p.clientTop+parseFloat(x.paddingTop))*b.y;l*=b.x,c*=b.y,d*=b.x,u*=b.y,l+=k,c+=v,m=Nt(p),p=Nc(m)}}return ni({width:d,height:u,x:l,y:c})}function Yc(t,e){const n=Qa(t).scrollLeft;return e?e.left+n:Br(yn(t)).left+n}function l0(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=r.left+e.scrollLeft-(n?0:Yc(t,r)),o=r.top+e.scrollTop;return{x:s,y:o}}function h5(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const o=s==="fixed",a=yn(r),i=e?Za(e.floating):!1;if(r===a||i&&o)return n;let l={scrollLeft:0,scrollTop:0},c=vn(1);const d=vn(0),u=bt(r);if((u||!u&&!o)&&((Rr(r)!=="body"||Do(a))&&(l=Qa(r)),bt(r))){const h=Br(r);c=Os(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}const g=a&&!u&&!o?l0(a,l,!0):vn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+g.x,y:n.y*c.y-l.scrollTop*c.y+d.y+g.y}}function g5(t){return Array.from(t.getClientRects())}function m5(t){const e=yn(t),n=Qa(t),r=t.ownerDocument.body,s=Fr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=Fr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Yc(t);const i=-n.scrollTop;return tn(r).direction==="rtl"&&(a+=Fr(e.clientWidth,r.clientWidth)-s),{width:s,height:o,x:a,y:i}}function p5(t,e){const n=Nt(t),r=yn(t),s=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,i=0,l=0;if(s){o=s.width,a=s.height;const c=Pc();(!c||c&&e==="fixed")&&(i=s.offsetLeft,l=s.offsetTop)}return{width:o,height:a,x:i,y:l}}function b5(t,e){const n=Br(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,o=bt(t)?Os(t):vn(1),a=t.clientWidth*o.x,i=t.clientHeight*o.y,l=s*o.x,c=r*o.y;return{width:a,height:i,x:l,y:c}}function c0(t,e,n){let r;if(e==="viewport")r=p5(t,n);else if(e==="document")r=m5(yn(t));else if(Ae(e))r=b5(e,n);else{const s=i0(t);r={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return ni(r)}function d0(t,e){const n=Vn(t);return n===e||!Ae(n)||fr(n)?!1:tn(n).position==="fixed"||d0(n,e)}function y5(t,e){const n=e.get(t);if(n)return n;let r=hr(t,[],!1).filter(i=>Ae(i)&&Rr(i)!=="body"),s=null;const o=tn(t).position==="fixed";let a=o?Vn(t):t;for(;Ae(a)&&!fr(a);){const i=tn(a),l=Tc(a);!l&&i.position==="fixed"&&(s=null),(o?!l&&!s:!l&&i.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Do(a)&&!l&&d0(t,a))?r=r.filter(d=>d!==a):s=i,a=Vn(a)}return e.set(t,r),r}function w5(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const a=[...n==="clippingAncestors"?Za(e)?[]:y5(e,this._c):[].concat(n),r],i=a[0],l=a.reduce((c,d)=>{const u=c0(e,d,s);return c.top=Fr(u.top,c.top),c.right=Cs(u.right,c.right),c.bottom=Cs(u.bottom,c.bottom),c.left=Fr(u.left,c.left),c},c0(e,i,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function v5(t){const{width:e,height:n}=a0(t);return{width:e,height:n}}function x5(t,e,n){const r=bt(e),s=yn(e),o=n==="fixed",a=Br(t,!0,o,e);let i={scrollLeft:0,scrollTop:0};const l=vn(0);if(r||!r&&!o)if((Rr(e)!=="body"||Do(s))&&(i=Qa(e)),r){const g=Br(e,!0,o,e);l.x=g.x+e.clientLeft,l.y=g.y+e.clientTop}else s&&(l.x=Yc(s));const c=s&&!r&&!o?l0(s,i):vn(0),d=a.left+i.scrollLeft-l.x-c.x,u=a.top+i.scrollTop-l.y-c.y;return{x:d,y:u,width:a.width,height:a.height}}function Uc(t){return tn(t).position==="static"}function u0(t,e){if(!bt(t)||tn(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return yn(t)===n&&(n=n.ownerDocument.body),n}function f0(t,e){const n=Nt(t);if(Za(t))return n;if(!bt(t)){let s=Vn(t);for(;s&&!fr(s);){if(Ae(s)&&!Uc(s))return s;s=Vn(s)}return n}let r=u0(t,e);for(;r&&Yk(r)&&Uc(r);)r=u0(r,e);return r&&fr(r)&&Uc(r)&&!Tc(r)?n:r||Uk(t)||n}const k5=async function(t){const e=this.getOffsetParent||f0,n=this.getDimensions,r=await n(t.floating);return{reference:x5(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function _5(t){return tn(t).direction==="rtl"}const C5={convertOffsetParentRelativeRectToViewportRelativeRect:h5,getDocumentElement:yn,getClippingRect:w5,getOffsetParent:f0,getElementRects:k5,getClientRects:g5,getDimensions:v5,getScale:Os,isElement:Ae,isRTL:_5};function h0(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function S5(t,e){let n=null,r;const s=yn(t);function o(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function a(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),o();const c=t.getBoundingClientRect(),{left:d,top:u,width:g,height:h}=c;if(i||e(),!g||!h)return;const m=Ss(u),p=Ss(s.clientWidth-(d+g)),b=Ss(s.clientHeight-(u+h)),y=Ss(d),k={rootMargin:-m+"px "+-p+"px "+-b+"px "+-y+"px",threshold:Fr(0,Cs(1,l))||1};let v=!0;function w(C){const N=C[0].intersectionRatio;if(N!==l){if(!v)return a();N?a(!1,N):r=setTimeout(()=>{a(!1,1e-7)},1e3)}N===1&&!h0(c,t.getBoundingClientRect())&&a(),v=!1}try{n=new IntersectionObserver(w,{...k,root:s.ownerDocument})}catch{n=new IntersectionObserver(w,k)}n.observe(t)}return a(!0),o}function g0(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Vc(t),d=s||o?[...c?hr(c):[],...hr(e)]:[];d.forEach(y=>{s&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const u=c&&i?S5(c,n):null;let g=-1,h=null;a&&(h=new ResizeObserver(y=>{let[x]=y;x&&x.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var k;(k=h)==null||k.observe(e)})),n()}),c&&!l&&h.observe(c),h.observe(e));let m,p=l?Br(t):null;l&&b();function b(){const y=Br(t);p&&!h0(p,y)&&n(),p=y,m=requestAnimationFrame(b)}return n(),()=>{var y;d.forEach(x=>{s&&x.removeEventListener("scroll",n),o&&x.removeEventListener("resize",n)}),u==null||u(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const M5=c5,O5=a5,D5=d5,E5=i5,m0=s5,T5=(t,e,n)=>{const r=new Map,s={platform:C5,...n},o={...s.platform,_c:r};return r5(t,e,{...s,platform:o})};var ri=typeof document<"u"?_.useLayoutEffect:_.useEffect;function si(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(!si(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 o=s[r];if(!(o==="_owner"&&t.$$typeof)&&!si(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function p0(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function b0(t,e){const n=p0(t);return Math.round(e*n)/n}function Gc(t){const e=Y.useRef(t);return ri(()=>{e.current=t}),e}function P5(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:a}={},transform:i=!0,whileElementsMounted:l,open:c}=t,[d,u]=Y.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[g,h]=Y.useState(r);si(g,r)||h(r);const[m,p]=Y.useState(null),[b,y]=Y.useState(null),x=Y.useCallback(W=>{W!==C.current&&(C.current=W,p(W))},[]),k=Y.useCallback(W=>{W!==N.current&&(N.current=W,y(W))},[]),v=o||m,w=a||b,C=Y.useRef(null),N=Y.useRef(null),T=Y.useRef(d),I=l!=null,D=Gc(l),z=Gc(s),L=Gc(c),P=Y.useCallback(()=>{if(!C.current||!N.current)return;const W={placement:e,strategy:n,middleware:g};z.current&&(W.platform=z.current),T5(C.current,N.current,W).then(X=>{const j={...X,isPositioned:L.current!==!1};M.current&&!si(T.current,j)&&(T.current=j,S2.flushSync(()=>{u(j)}))})},[g,e,n,z,L]);ri(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,u(W=>({...W,isPositioned:!1})))},[c]);const M=Y.useRef(!1);ri(()=>(M.current=!0,()=>{M.current=!1}),[]),ri(()=>{if(v&&(C.current=v),w&&(N.current=w),v&&w){if(D.current)return D.current(v,w,P);P()}},[v,w,P,D,I]);const E=Y.useMemo(()=>({reference:C,floating:N,setReference:x,setFloating:k}),[x,k]),S=Y.useMemo(()=>({reference:v,floating:w}),[v,w]),B=Y.useMemo(()=>{const W={position:n,left:0,top:0};if(!S.floating)return W;const X=b0(S.floating,d.x),j=b0(S.floating,d.y);return i?{...W,transform:"translate("+X+"px, "+j+"px)",...p0(S.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:X,top:j}},[n,i,S.floating,d.x,d.y]);return Y.useMemo(()=>({...d,update:P,refs:E,elements:S,floatingStyles:B}),[d,P,E,S,B])}const N5=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?m0({element:r.current,padding:s}).fn(n):{}:r?m0({element:r,padding:s}).fn(n):{}}}},j5=(t,e)=>({...M5(t),options:[t,e]}),I5=(t,e)=>({...D5(t),options:[t,e]}),A5=(t,e)=>({...E5(t),options:[t,e]}),L5=(t,e)=>({...O5(t),options:[t,e]}),R5=(t,e)=>({...N5(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 F5=["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])"],oi=F5.join(","),y0=typeof Element>"u",Ds=y0?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ai=!y0&&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},ii=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"),o=s===""||s==="true",a=o||n&&e&&t(e.parentNode);return a},B5=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},W5=function(e,n,r){if(ii(e))return[];var s=Array.prototype.slice.apply(e.querySelectorAll(oi));return n&&Ds.call(e,oi)&&s.unshift(e),s=s.filter(r),s},z5=function t(e,n,r){for(var s=[],o=Array.from(e);o.length;){var a=o.shift();if(!ii(a,!1))if(a.tagName==="SLOT"){var i=a.assignedElements(),l=i.length?i:a.children,c=t(l,!0,r);r.flatten?s.push.apply(s,c):s.push({scopeParent:a,candidates:c})}else{var d=Ds.call(a,oi);d&&r.filter(a)&&(n||!e.includes(a))&&s.push(a);var u=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),g=!ii(u,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(u&&g){var h=t(u===!0?a.children:u.children,!0,r);r.flatten?s.push.apply(s,h):s.push({scopeParent:a,candidates:h})}else o.unshift.apply(o,a.children)}}return s},w0=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},v0=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||B5(e))&&!w0(e)?0:e.tabIndex},H5=function(e,n){var r=v0(e);return r<0&&n&&!w0(e)?0:r},V5=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},x0=function(e){return e.tagName==="INPUT"},Y5=function(e){return x0(e)&&e.type==="hidden"},U5=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},G5=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},X5=function(e){if(!e.name)return!0;var n=e.form||ai(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(a){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",a.message),!1}var o=G5(s,e.form);return!o||o===e},K5=function(e){return x0(e)&&e.type==="radio"},Z5=function(e){return K5(e)&&!X5(e)},Q5=function(e){var n,r=e&&ai(e),s=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==e){var a,i,l;for(o=!!((a=s)!==null&&a!==void 0&&(i=a.ownerDocument)!==null&&i!==void 0&&i.contains(s)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!o&&s;){var c,d,u;r=ai(s),s=(c=r)===null||c===void 0?void 0:c.host,o=!!((d=s)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(s))}}return o},k0=function(e){var n=e.getBoundingClientRect(),r=n.width,s=n.height;return r===0&&s===0},J5=function(e,n){var r=n.displayCheck,s=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var o=Ds.call(e,"details>summary:first-of-type"),a=o?e.parentElement:e;if(Ds.call(a,"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=ai(e);if(l&&!l.shadowRoot&&s(l)===!0)return k0(e);e.assignedSlot?e=e.assignedSlot:!l&&c!==e.ownerDocument?e=c.host:e=l}e=i}if(Q5(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return k0(e);return!1},q5=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 Ds.call(n,"fieldset[disabled] *")?!0:!s.contains(e)}return!0}n=n.parentElement}return!1},$5=function(e,n){return!(n.disabled||ii(n)||Y5(n)||J5(n,e)||U5(n)||q5(n))},Xc=function(e,n){return!(Z5(n)||v0(n)<0||!$5(e,n))},e3=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},t3=function t(e){var n=[],r=[];return e.forEach(function(s,o){var a=!!s.scopeParent,i=a?s.scopeParent:s,l=H5(i,a),c=a?t(s.candidates):i;l===0?a?n.push.apply(n,c):n.push(i):r.push({documentOrder:o,tabIndex:l,item:s,isScope:a,content:c})}),r.sort(V5).reduce(function(s,o){return o.isScope?s.push.apply(s,o.content):s.push(o.content),s},[]).concat(n)},li=function(e,n){n=n||{};var r;return n.getShadowRoot?r=z5([e],n.includeContainer,{filter:Xc.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:e3}):r=W5(e,n.includeContainer,Xc.bind(null,n)),t3(r)},n3=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Ds.call(e,oi)===!1?!1:Xc(n,e)};function _0(t){return Y.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})},t)}const r3=Y.useInsertionEffect||(t=>t());function kn(t){const e=Y.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return r3(()=>{e.current=t}),Y.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 Kc="ArrowUp",Eo="ArrowDown",Es="ArrowLeft",Ts="ArrowRight";function ci(t,e,n){return Math.floor(t/e)!==n}function To(t,e){return e<0||e>=t.current.length}function Zc(t,e){return kt(t,{disabledIndices:e})}function C0(t,e){return kt(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function kt(t,e){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:s,amount:o=1}=e===void 0?{}:e;const a=t.current,i=s?c=>s.includes(c):c=>{const d=a[c];return d==null||d.hasAttribute("disabled")||d.getAttribute("aria-disabled")==="true"};let l=n;do l+=r?-o:o;while(l>=0&&l<=a.length-1&&i(l));return l}function s3(t,e){let{event:n,orientation:r,loop:s,cols:o,disabledIndices:a,minIndex:i,maxIndex:l,prevIndex:c,stopEvent:d=!1}=e,u=c;if(n.key===Kc){if(d&&yt(n),c===-1)u=l;else if(u=kt(t,{startingIndex:u,amount:o,decrement:!0,disabledIndices:a}),s&&(c-o<i||u<0)){const g=c%o,h=l%o,m=l-(h-g);h===g?u=l:u=h>g?m:m-o}To(t,u)&&(u=c)}if(n.key===Eo&&(d&&yt(n),c===-1?u=i:(u=kt(t,{startingIndex:c,amount:o,disabledIndices:a}),s&&c+o>l&&(u=kt(t,{startingIndex:c%o-o,amount:o,disabledIndices:a}))),To(t,u)&&(u=c)),r==="both"){const g=Ss(c/o);n.key===Ts&&(d&&yt(n),c%o!==o-1?(u=kt(t,{startingIndex:c,disabledIndices:a}),s&&ci(u,o,g)&&(u=kt(t,{startingIndex:c-c%o-1,disabledIndices:a}))):s&&(u=kt(t,{startingIndex:c-c%o-1,disabledIndices:a})),ci(u,o,g)&&(u=c)),n.key===Es&&(d&&yt(n),c%o!==0?(u=kt(t,{startingIndex:c,disabledIndices:a,decrement:!0}),s&&ci(u,o,g)&&(u=kt(t,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a}))):s&&(u=kt(t,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a})),ci(u,o,g)&&(u=c));const h=Ss(l/o)===g;To(t,u)&&(s&&h?u=n.key===Es?l:kt(t,{startingIndex:c-c%o-1,disabledIndices:a}):u=c)}return u}function o3(t,e,n){const r=[];let s=0;return t.forEach((o,a)=>{let{width:i,height:l}=o;if(i>e&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+a+" is greater than grid columns");let c=!1;for(n&&(s=0);!c;){const d=[];for(let u=0;u<i;u++)for(let g=0;g<l;g++)d.push(s+u+g*e);s%e+i<=e&&d.every(u=>r[u]==null)?(d.forEach(u=>{r[u]=a}),c=!0):s++}}),[...r]}function a3(t,e,n,r,s){if(t===-1)return-1;const o=n.indexOf(t);switch(s){case"tl":return o;case"tr":return o+e[t].width-1;case"bl":return o+(e[t].height-1)*r;case"br":return n.lastIndexOf(t)}}function i3(t,e){return e.flatMap((n,r)=>t.includes(n)?[r]:[])}let S0=0;function Un(t,e){e===void 0&&(e={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:s=!1}=e;r&&cancelAnimationFrame(S0);const o=()=>t==null?void 0:t.focus({preventScroll:n});s?o():S0=requestAnimationFrame(o)}var Be=typeof document<"u"?_.useLayoutEffect:_.useEffect;function l3(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 c3(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 M0=Y.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function d3(t){let{children:e,elementsRef:n,labelsRef:r}=t;const[s,o]=Y.useState(()=>new Map),a=Y.useCallback(l=>{o(c=>new Map(c).set(l,null))},[]),i=Y.useCallback(l=>{o(c=>{const d=new Map(c);return d.delete(l),d})},[]);return Be(()=>{const l=new Map(s);Array.from(l.keys()).sort(l3).forEach((d,u)=>{l.set(d,u)}),c3(s,l)||o(l)},[s]),Y.createElement(M0.Provider,{value:Y.useMemo(()=>({register:a,unregister:i,map:s,elementsRef:n,labelsRef:r}),[a,i,s,n,r])},e)}function u3(t){let{label:e}=t===void 0?{}:t;const[n,r]=Y.useState(null),s=Y.useRef(null),{register:o,unregister:a,map:i,elementsRef:l,labelsRef:c}=Y.useContext(M0),d=Y.useCallback(u=>{if(s.current=u,n!==null&&(l.current[n]=u,c)){var g;const h=e!==void 0;c.current[n]=h?e:(g=u==null?void 0:u.textContent)!=null?g:null}},[n,l,c,e]);return Be(()=>{const u=s.current;if(u)return o(u),()=>{a(u)}},[o,a]),Be(()=>{const u=s.current?i.get(s.current):null;u!=null&&r(u)},[i]),Y.useMemo(()=>({ref:d,index:n??-1}),[n,d])}function Po(){return Po=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},Po.apply(this,arguments)}let Qc=!1,f3=0;const O0=()=>"floating-ui-"+f3++;function h3(){const[t,e]=Y.useState(()=>Qc?O0():void 0);return Be(()=>{t==null&&e(O0())},[]),Y.useEffect(()=>{Qc||(Qc=!0)},[]),t}const di=Y.useId||h3;function g3(){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 m3=Y.createContext(null),p3=Y.createContext(null),ui=()=>{var t;return((t=Y.useContext(m3))==null?void 0:t.id)||null},No=()=>Y.useContext(p3);function Wr(t){return"data-floating-ui-"+t}function _n(t){const e=_.useRef(t);return Be(()=>{e.current=t}),e}const D0=Wr("safe-polygon");function Jc(t,e,n){return n&&!Ja(n)?0:typeof t=="number"?t:t==null?void 0:t[e]}function b3(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:s,events:o,elements:{domReference:a,floating:i},refs:l}=t,{enabled:c=!0,delay:d=0,handleClose:u=null,mouseOnly:g=!1,restMs:h=0,move:m=!0}=e,p=No(),b=ui(),y=_n(u),x=_n(d),k=Y.useRef(),v=Y.useRef(),w=Y.useRef(),C=Y.useRef(),N=Y.useRef(!0),T=Y.useRef(!1),I=Y.useRef(()=>{}),D=Y.useCallback(()=>{var M;const E=(M=s.current.openEvent)==null?void 0:M.type;return(E==null?void 0:E.includes("mouse"))&&E!=="mousedown"},[s]);Y.useEffect(()=>{if(!c)return;function M(E){let{open:S}=E;S||(clearTimeout(v.current),clearTimeout(C.current),N.current=!0)}return o.on("openchange",M),()=>{o.off("openchange",M)}},[c,o]),Y.useEffect(()=>{if(!c||!y.current||!n)return;function M(S){D()&&r(!1,S,"hover")}const E=Ot(i).documentElement;return E.addEventListener("mouseleave",M),()=>{E.removeEventListener("mouseleave",M)}},[i,n,r,c,y,D]);const z=Y.useCallback(function(M,E,S){E===void 0&&(E=!0),S===void 0&&(S="hover");const B=Jc(x.current,"close",k.current);B&&!w.current?(clearTimeout(v.current),v.current=setTimeout(()=>r(!1,M,S),B)):E&&(clearTimeout(v.current),r(!1,M,S))},[x,r]),L=Y.useCallback(()=>{I.current(),w.current=void 0},[]),P=Y.useCallback(()=>{if(T.current){const M=Ot(l.floating.current).body;M.style.pointerEvents="",M.removeAttribute(D0),T.current=!1}},[l]);return Y.useEffect(()=>{if(!c)return;function M(){return s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1}function E(W){if(clearTimeout(v.current),N.current=!1,g&&!Ja(k.current)||h>0&&Jc(x.current,"open")===0)return;const X=Jc(x.current,"open",k.current);X?v.current=setTimeout(()=>{r(!0,W,"hover")},X):r(!0,W,"hover")}function S(W){if(M())return;I.current();const X=Ot(i);if(clearTimeout(C.current),y.current){n||clearTimeout(v.current),w.current=y.current({...t,tree:p,x:W.clientX,y:W.clientY,onClose(){P(),L(),z(W,!0,"safe-polygon")}});const V=w.current;X.addEventListener("mousemove",V),I.current=()=>{X.removeEventListener("mousemove",V)};return}(k.current==="touch"?!st(i,W.relatedTarget):!0)&&z(W)}function B(W){M()||y.current==null||y.current({...t,tree:p,x:W.clientX,y:W.clientY,onClose(){P(),L(),z(W)}})(W)}if(Ae(a)){const W=a;return n&&W.addEventListener("mouseleave",B),i==null||i.addEventListener("mouseleave",B),m&&W.addEventListener("mousemove",E,{once:!0}),W.addEventListener("mouseenter",E),W.addEventListener("mouseleave",S),()=>{n&&W.removeEventListener("mouseleave",B),i==null||i.removeEventListener("mouseleave",B),m&&W.removeEventListener("mousemove",E),W.removeEventListener("mouseenter",E),W.removeEventListener("mouseleave",S)}}},[a,i,c,t,g,h,m,z,L,P,r,n,p,x,y,s]),Be(()=>{var M;if(c&&n&&(M=y.current)!=null&&M.__options.blockPointerEvents&&D()){const S=Ot(i).body;if(S.setAttribute(D0,""),S.style.pointerEvents="none",T.current=!0,Ae(a)&&i){var E;const B=a,W=p==null||(E=p.nodesRef.current.find(X=>X.id===b))==null||(E=E.context)==null?void 0:E.elements.floating;return W&&(W.style.pointerEvents=""),B.style.pointerEvents="auto",i.style.pointerEvents="auto",()=>{B.style.pointerEvents="",i.style.pointerEvents=""}}}},[c,n,b,i,a,p,y,D]),Be(()=>{n||(k.current=void 0,L(),P())},[n,L,P]),Y.useEffect(()=>()=>{L(),clearTimeout(v.current),clearTimeout(C.current),P()},[c,a,L,P]),Y.useMemo(()=>{if(!c)return{};function M(E){k.current=E.pointerType}return{reference:{onPointerDown:M,onPointerEnter:M,onMouseMove(E){n||h===0||(clearTimeout(C.current),C.current=setTimeout(()=>{N.current||r(!0,E.nativeEvent,"hover")},h))}},floating:{onMouseEnter(){clearTimeout(v.current)},onMouseLeave(E){z(E.nativeEvent,!1)}}}},[c,h,n,r,z])}function y3(t,e){var n;let r=[],s=(n=t.find(o=>o.id===e))==null?void 0:n.parentId;for(;s;){const o=t.find(a=>a.id===s);s=o==null?void 0:o.parentId,o&&(r=r.concat(o))}return r}function zr(t,e){let n=t.filter(s=>{var o;return s.parentId===e&&((o=s.context)==null?void 0:o.open)}),r=n;for(;r.length;)r=t.filter(s=>{var o;return(o=r)==null?void 0:o.some(a=>{var i;return s.parentId===a.id&&((i=s.context)==null?void 0:i.open)})}),n=n.concat(r);return n}function w3(t,e){let n,r=-1;function s(o,a){a>r&&(n=o,r=a),zr(t,o).forEach(l=>{s(l.id,a+1)})}return s(e,0),t.find(o=>o.id===n)}let Ps=new WeakMap,fi=new WeakSet,hi={},qc=0;const v3=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,E0=t=>t&&(t.host||E0(t.parentNode)),x3=(t,e)=>e.map(n=>{if(t.contains(n))return n;const r=E0(n);return t.contains(r)?r:null}).filter(n=>n!=null);function k3(t,e,n,r){const s="data-floating-ui-inert",o=r?"inert":n?"aria-hidden":null,a=x3(e,t),i=new Set,l=new Set(a),c=[];hi[s]||(hi[s]=new WeakMap);const d=hi[s];a.forEach(u),g(e),i.clear();function u(h){!h||i.has(h)||(i.add(h),h.parentNode&&u(h.parentNode))}function g(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,m=>{if(i.has(m))g(m);else{const p=o?m.getAttribute(o):null,b=p!==null&&p!=="false",y=(Ps.get(m)||0)+1,x=(d.get(m)||0)+1;Ps.set(m,y),d.set(m,x),c.push(m),y===1&&b&&fi.add(m),x===1&&m.setAttribute(s,""),!b&&o&&m.setAttribute(o,"true")}})}return qc++,()=>{c.forEach(h=>{const m=(Ps.get(h)||0)-1,p=(d.get(h)||0)-1;Ps.set(h,m),d.set(h,p),m||(!fi.has(h)&&o&&h.removeAttribute(o),fi.delete(h)),p||h.removeAttribute(s)}),qc--,qc||(Ps=new WeakMap,Ps=new WeakMap,fi=new WeakSet,hi={})}}function T0(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=Ot(t[0]).body;return k3(t.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,e,n)}const jo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function P0(t,e){const n=li(t,jo());e==="prev"&&n.reverse();const r=n.indexOf(wn(Ot(t)));return n.slice(r+1)[0]}function N0(){return P0(document.body,"next")}function j0(){return P0(document.body,"prev")}function Io(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!st(n,r)}function _3(t){li(t,jo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function C3(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 $c={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 S3;function I0(t){t.key==="Tab"&&(t.target,clearTimeout(S3))}const gi=Y.forwardRef(function(e,n){const[r,s]=Y.useState();Be(()=>(Ac()&&s("button"),document.addEventListener("keydown",I0),()=>{document.removeEventListener("keydown",I0)}),[]);const o={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Wr("focus-guard")]:"",style:$c};return Y.createElement("span",Po({},e,o))}),A0=Y.createContext(null),L0=Wr("portal");function M3(t){let{id:e,root:n}=t===void 0?{}:t;const[r,s]=Y.useState(null),o=di(),a=R0(),i=Y.useRef(null);return Be(()=>()=>{r==null||r.remove(),queueMicrotask(()=>{i.current=null})},[r]),Be(()=>{if(i.current)return;const l=e?document.getElementById(e):null;if(!l)return;const c=document.createElement("div");c.id=o,c.setAttribute(L0,""),l.appendChild(c),i.current=c,s(c)},[e,o]),Be(()=>{if(i.current)return;let l=n||(a==null?void 0:a.portalNode);l&&!Ae(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=o,d.setAttribute(L0,""),l=c||l,l.appendChild(d),i.current=d,s(d)},[e,n,o,a]),r}function O3(t){let{children:e,id:n,root:r=null,preserveTabOrder:s=!0}=t;const o=M3({id:n,root:r}),[a,i]=Y.useState(null),l=Y.useRef(null),c=Y.useRef(null),d=Y.useRef(null),u=Y.useRef(null),g=!!a&&!a.modal&&a.open&&s&&!!(r||o);return Y.useEffect(()=>{if(!o||!s||a!=null&&a.modal)return;function h(m){o&&Io(m)&&(m.type==="focusin"?C3:_3)(o)}return o.addEventListener("focusin",h,!0),o.addEventListener("focusout",h,!0),()=>{o.removeEventListener("focusin",h,!0),o.removeEventListener("focusout",h,!0)}},[o,s,a==null?void 0:a.modal]),Y.createElement(A0.Provider,{value:Y.useMemo(()=>({preserveTabOrder:s,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:u,portalNode:o,setFocusManagerState:i}),[s,o])},g&&o&&Y.createElement(gi,{"data-type":"outside",ref:l,onFocus:h=>{if(Io(h,o)){var m;(m=d.current)==null||m.focus()}else{const p=j0()||(a==null?void 0:a.refs.domReference.current);p==null||p.focus()}}}),g&&o&&Y.createElement("span",{"aria-owns":o.id,style:$c}),o&&nh.createPortal(e,o),g&&o&&Y.createElement(gi,{"data-type":"outside",ref:c,onFocus:h=>{if(Io(h,o)){var m;(m=u.current)==null||m.focus()}else{const p=N0()||(a==null?void 0:a.refs.domReference.current);p==null||p.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,h.nativeEvent))}}}))}const R0=()=>Y.useContext(A0),D3=20;let Hr=[];function ed(t){Hr=Hr.filter(n=>n.isConnected);let e=t;if(!(!e||Rr(e)==="body")){if(!n3(e,jo())){const n=li(e,jo())[0];if(!n)return;e=n}Hr.push(e),Hr.length>D3&&(Hr=Hr.slice(-20))}}function F0(){return Hr.slice().reverse().find(t=>t.isConnected)}const E3=Y.forwardRef(function(e,n){return Y.createElement("button",Po({},e,{type:"button",ref:n,tabIndex:-1,style:$c}))});function B0(t){const{context:e,children:n,disabled:r=!1,order:s=["content"],guards:o=!0,initialFocus:a=0,returnFocus:i=!0,modal:l=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:d=!0}=t,{open:u,refs:g,nodeId:h,onOpenChange:m,events:p,dataRef:b,elements:{domReference:y,floating:x}}=e,k=typeof a=="number"&&a<0,v=$h(y)&&k,w=v3()?o:!0,C=_n(s),N=_n(a),T=_n(i),I=No(),D=R0(),z=Y.useRef(null),L=Y.useRef(null),P=Y.useRef(!1),M=Y.useRef(!1),E=D!=null,S=Y.useCallback(function(j){return j===void 0&&(j=x),j?li(j,jo()):[]},[x]),B=Y.useCallback(j=>{const V=S(j);return C.current.map(A=>y&&A==="reference"?y:x&&A==="floating"?x:V).filter(Boolean).flat()},[y,x,C,S]);Y.useEffect(()=>{if(r||!l)return;function j(A){if(A.key==="Tab"){st(x,wn(Ot(x)))&&S().length===0&&!v&&yt(A);const R=B(),F=gr(A);C.current[0]==="reference"&&F===y&&(yt(A),A.shiftKey?Un(R[R.length-1]):Un(R[1])),C.current[1]==="floating"&&F===x&&A.shiftKey&&(yt(A),Un(R[0]))}}const V=Ot(x);return V.addEventListener("keydown",j),()=>{V.removeEventListener("keydown",j)}},[r,y,x,l,C,v,S,B]),Y.useEffect(()=>{if(r||!d)return;function j(){M.current=!0,setTimeout(()=>{M.current=!1})}function V(A){const R=A.relatedTarget;queueMicrotask(()=>{const F=!(st(y,R)||st(x,R)||st(R,x)||st(D==null?void 0:D.portalNode,R)||R!=null&&R.hasAttribute(Wr("focus-guard"))||I&&(zr(I.nodesRef.current,h).find(O=>{var H,q;return st((H=O.context)==null?void 0:H.elements.floating,R)||st((q=O.context)==null?void 0:q.elements.domReference,R)})||y3(I.nodesRef.current,h).find(O=>{var H,q;return((H=O.context)==null?void 0:H.elements.floating)===R||((q=O.context)==null?void 0:q.elements.domReference)===R})));R&&F&&!M.current&&R!==F0()&&(P.current=!0,m(!1,A))})}if(x&&bt(y))return y.addEventListener("focusout",V),y.addEventListener("pointerdown",j),!l&&x.addEventListener("focusout",V),()=>{y.removeEventListener("focusout",V),y.removeEventListener("pointerdown",j),!l&&x.removeEventListener("focusout",V)}},[r,y,x,l,h,I,D,m,d]),Y.useEffect(()=>{var j;if(r)return;const V=Array.from((D==null||(j=D.portalNode)==null?void 0:j.querySelectorAll("["+Wr("portal")+"]"))||[]);if(x){const A=[x,...V,z.current,L.current,C.current.includes("reference")||v?y:null].filter(F=>F!=null),R=l||v?T0(A,w,!w):T0(A);return()=>{R()}}},[r,y,x,l,C,D,v,w]),Be(()=>{if(r||!x)return;const j=Ot(x),V=wn(j);queueMicrotask(()=>{const A=B(x),R=N.current,F=(typeof R=="number"?A[R]:R.current)||x,O=st(x,V);!k&&!O&&u&&Un(F,{preventScroll:F===x})})},[r,u,x,k,B,N]),Be(()=>{if(r||!x)return;let j=!1;const V=Ot(x),A=wn(V),R=b.current;ed(A);function F(O){let{reason:H,event:q,nested:Z}=O;H==="escape-key"&&g.domReference.current&&ed(g.domReference.current),H==="hover"&&q.type==="mouseleave"&&(P.current=!0),H==="outside-press"&&(Z?(P.current=!1,j=!0):P.current=!(Jh(q)||Ic(q)))}return p.on("openchange",F),()=>{p.off("openchange",F);const O=wn(V),H=st(x,O)||I&&zr(I.nodesRef.current,h).some($=>{var te;return st((te=$.context)==null?void 0:te.elements.floating,O)});(H||R.openEvent&&["click","mousedown"].includes(R.openEvent.type))&&g.domReference.current&&ed(g.domReference.current);const Z=F0();T.current&&!P.current&&bt(Z)&&(!(Z!==O&&O!==V.body)||H)&&Un(Z,{cancelPrevious:!1,preventScroll:j})}},[r,x,T,b,g,p,I,h]),Be(()=>{if(!(r||!D))return D.setFocusManagerState({modal:l,closeOnFocusOut:d,open:u,onOpenChange:m,refs:g}),()=>{D.setFocusManagerState(null)}},[r,D,l,u,m,g,d]),Be(()=>{if(r||!x||typeof MutationObserver!="function"||k)return;const j=()=>{const A=x.getAttribute("tabindex");C.current.includes("floating")||wn(Ot(x))!==g.domReference.current&&S().length===0?A!=="0"&&x.setAttribute("tabindex","0"):A!=="-1"&&x.setAttribute("tabindex","-1")};j();const V=new MutationObserver(j);return V.observe(x,{childList:!0,subtree:!0,attributes:!0}),()=>{V.disconnect()}},[r,x,g,C,S,k]);function W(j){return r||!c||!l?null:Y.createElement(E3,{ref:j==="start"?z:L,onClick:V=>m(!1,V.nativeEvent)},typeof c=="string"?c:"Dismiss")}const X=!r&&w&&(E||l);return Y.createElement(Y.Fragment,null,X&&Y.createElement(gi,{"data-type":"inside",ref:D==null?void 0:D.beforeInsideRef,onFocus:j=>{if(l){const A=B();Un(s[0]==="reference"?A[0]:A[A.length-1])}else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(P.current=!1,Io(j,D.portalNode)){const A=N0()||y;A==null||A.focus()}else{var V;(V=D.beforeOutsideRef.current)==null||V.focus()}}}),!v&&W("start"),n,W("end"),X&&Y.createElement(gi,{"data-type":"inside",ref:D==null?void 0:D.afterInsideRef,onFocus:j=>{if(l)Un(B()[0]);else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(d&&(P.current=!0),Io(j,D.portalNode)){const A=j0()||y;A==null||A.focus()}else{var V;(V=D.afterOutsideRef.current)==null||V.focus()}}}))}const td=new Set,T3=Y.forwardRef(function(e,n){let{lockScroll:r=!1,...s}=e;const o=di();return Be(()=>{if(!r)return;td.add(o);const a=/iP(hone|ad|od)|iOS/.test(jc()),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,g=i.top?parseFloat(i.top):window.pageYOffset;if(i.overflow="hidden",d&&(i[c]=d+"px"),a){var h,m;const p=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,b=((m=window.visualViewport)==null?void 0:m.offsetTop)||0;Object.assign(i,{position:"fixed",top:-(g-Math.floor(b))+"px",left:-(u-Math.floor(p))+"px",right:"0"})}return()=>{td.delete(o),td.size===0&&(Object.assign(i,{overflow:"",[c]:""}),a&&(Object.assign(i,{position:"",top:"",left:"",right:""}),window.scrollTo(u,g)))}},[o,r]),Y.createElement("div",Po({ref:n},s,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...s.style}}))});function W0(t){return bt(t.target)&&t.target.tagName==="BUTTON"}function z0(t){return Fc(t)}function H0(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:s,elements:{domReference:o}}=t,{enabled:a=!0,event:i="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:d=!0}=e,u=Y.useRef(),g=Y.useRef(!1);return Y.useMemo(()=>a?{reference:{onPointerDown(h){u.current=h.pointerType},onMouseDown(h){h.button===0&&(Ja(u.current,!0)&&c||i!=="click"&&(n&&l&&(!s.current.openEvent||s.current.openEvent.type==="mousedown")?r(!1,h.nativeEvent,"click"):(h.preventDefault(),r(!0,h.nativeEvent,"click"))))},onClick(h){if(i==="mousedown"&&u.current){u.current=void 0;return}Ja(u.current,!0)&&c||(n&&l&&(!s.current.openEvent||s.current.openEvent.type==="click")?r(!1,h.nativeEvent,"click"):r(!0,h.nativeEvent,"click"))},onKeyDown(h){u.current=void 0,!(h.defaultPrevented||!d||W0(h))&&(h.key===" "&&!z0(o)&&(h.preventDefault(),g.current=!0),h.key==="Enter"&&r(!(n&&l),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!d||W0(h)||z0(o)||h.key===" "&&g.current&&(g.current=!1,r(!(n&&l),h.nativeEvent,"click"))}}}:{},[a,s,i,c,d,o,l,n,r])}const P3={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},N3={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},V0=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 Y0(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,nodeId:s,elements:{reference:o,domReference:a,floating:i},dataRef:l}=t,{enabled:c=!0,escapeKey:d=!0,outsidePress:u=!0,outsidePressEvent:g="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:p=!1,bubbles:b,capture:y}=e,x=No(),k=kn(typeof u=="function"?u:()=>!1),v=typeof u=="function"?k:u,w=Y.useRef(!1),C=Y.useRef(!1),{escapeKey:N,outsidePress:T}=V0(b),{escapeKey:I,outsidePress:D}=V0(y),z=kn(E=>{if(!n||!c||!d||E.key!=="Escape")return;const S=x?zr(x.nodesRef.current,s):[];if(!N&&(E.stopPropagation(),S.length>0)){let B=!0;if(S.forEach(W=>{var X;if((X=W.context)!=null&&X.open&&!W.context.dataRef.current.__escapeKeyBubbles){B=!1;return}}),!B)return}r(!1,Xk(E)?E.nativeEvent:E,"escape-key")}),L=kn(E=>{var S;const B=()=>{var W;z(E),(W=gr(E))==null||W.removeEventListener("keydown",B)};(S=gr(E))==null||S.addEventListener("keydown",B)}),P=kn(E=>{const S=w.current;w.current=!1;const B=C.current;if(C.current=!1,g==="click"&&B||S||typeof v=="function"&&!v(E))return;const W=gr(E),X="["+Wr("inert")+"]",j=Ot(i).querySelectorAll(X);let V=Ae(W)?W:null;for(;V&&!fr(V);){const F=Vn(V);if(fr(F)||!Ae(F))break;V=F}if(j.length&&Ae(W)&&!Kk(W)&&!st(W,i)&&Array.from(j).every(F=>!st(V,F)))return;if(bt(W)&&i){const F=W.clientWidth>0&&W.scrollWidth>W.clientWidth,O=W.clientHeight>0&&W.scrollHeight>W.clientHeight;let H=O&&E.offsetX>W.clientWidth;if(O&&tn(W).direction==="rtl"&&(H=E.offsetX<=W.offsetWidth-W.clientWidth),H||F&&E.offsetY>W.clientHeight)return}const A=x&&zr(x.nodesRef.current,s).some(F=>{var O;return Rc(E,(O=F.context)==null?void 0:O.elements.floating)});if(Rc(E,i)||Rc(E,a)||A)return;const R=x?zr(x.nodesRef.current,s):[];if(R.length>0){let F=!0;if(R.forEach(O=>{var H;if((H=O.context)!=null&&H.open&&!O.context.dataRef.current.__outsidePressBubbles){F=!1;return}}),!F)return}r(!1,E,"outside-press")}),M=kn(E=>{var S;const B=()=>{var W;P(E),(W=gr(E))==null||W.removeEventListener(g,B)};(S=gr(E))==null||S.addEventListener(g,B)});return Y.useEffect(()=>{if(!n||!c)return;l.current.__escapeKeyBubbles=N,l.current.__outsidePressBubbles=T;function E(W){r(!1,W,"ancestor-scroll")}const S=Ot(i);d&&S.addEventListener("keydown",I?L:z,I),v&&S.addEventListener(g,D?M:P,D);let B=[];return p&&(Ae(a)&&(B=hr(a)),Ae(i)&&(B=B.concat(hr(i))),!Ae(o)&&o&&o.contextElement&&(B=B.concat(hr(o.contextElement)))),B=B.filter(W=>{var X;return W!==((X=S.defaultView)==null?void 0:X.visualViewport)}),B.forEach(W=>{W.addEventListener("scroll",E,{passive:!0})}),()=>{d&&S.removeEventListener("keydown",I?L:z,I),v&&S.removeEventListener(g,D?M:P,D),B.forEach(W=>{W.removeEventListener("scroll",E)})}},[l,i,a,o,d,v,g,n,r,p,c,N,T,z,I,L,P,D,M]),Y.useEffect(()=>{w.current=!1},[v,g]),Y.useMemo(()=>c?{reference:{onKeyDown:z,[P3[m]]:E=>{h&&r(!1,E.nativeEvent,"reference-press")}},floating:{onKeyDown:z,onMouseDown(){C.current=!0},onMouseUp(){C.current=!0},[N3[g]]:()=>{w.current=!0}}}:{},[c,h,g,m,r,z])}let nd;process.env.NODE_ENV!=="production"&&(nd=new Set);function U0(t){var e;t===void 0&&(t={});const{open:n=!1,onOpenChange:r,nodeId:s}=t;if(process.env.NODE_ENV!=="production"){var o;const T="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((o=t.elements)!=null&&o.reference&&!Ae(t.elements.reference)){var a;if(!((a=nd)!=null&&a.has(T))){var i;(i=nd)==null||i.add(T),console.error(T)}}}const[l,c]=Y.useState(null),d=((e=t.elements)==null?void 0:e.reference)||l,u=P5(t),g=No(),h=ui()!=null,m=kn((T,I,D)=>{T&&(b.current.openEvent=I),y.emit("openchange",{open:T,event:I,reason:D,nested:h}),r==null||r(T,I,D)}),p=Y.useRef(null),b=Y.useRef({}),y=Y.useState(()=>g3())[0],x=di(),k=Y.useCallback(T=>{const I=Ae(T)?{getBoundingClientRect:()=>T.getBoundingClientRect(),contextElement:T}:T;u.refs.setReference(I)},[u.refs]),v=Y.useCallback(T=>{(Ae(T)||T===null)&&(p.current=T,c(T)),(Ae(u.refs.reference.current)||u.refs.reference.current===null||T!==null&&!Ae(T))&&u.refs.setReference(T)},[u.refs]),w=Y.useMemo(()=>({...u.refs,setReference:v,setPositionReference:k,domReference:p}),[u.refs,v,k]),C=Y.useMemo(()=>({...u.elements,domReference:d}),[u.elements,d]),N=Y.useMemo(()=>({...u,refs:w,elements:C,dataRef:b,nodeId:s,floatingId:x,events:y,open:n,onOpenChange:m}),[u,s,x,y,n,m,w,C]);return Be(()=>{const T=g==null?void 0:g.nodesRef.current.find(I=>I.id===s);T&&(T.context=N)}),Y.useMemo(()=>({...u,context:N,refs:w,elements:C}),[u,w,C,N])}function j3(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,events:s,refs:o,elements:{domReference:a}}=t,{enabled:i=!0,visibleOnly:l=!0}=e,c=Y.useRef(!1),d=Y.useRef(),u=Y.useRef(!0);return Y.useEffect(()=>{if(!i)return;const g=Nt(a);function h(){!n&&bt(a)&&a===wn(Ot(a))&&(c.current=!0)}function m(){u.current=!0}return g.addEventListener("blur",h),g.addEventListener("keydown",m,!0),()=>{g.removeEventListener("blur",h),g.removeEventListener("keydown",m,!0)}},[a,n,i]),Y.useEffect(()=>{if(!i)return;function g(h){let{reason:m}=h;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return s.on("openchange",g),()=>{s.off("openchange",g)}},[s,i]),Y.useEffect(()=>()=>{clearTimeout(d.current)},[]),Y.useMemo(()=>i?{reference:{onPointerDown(g){Ic(g.nativeEvent)||(u.current=!1)},onMouseLeave(){c.current=!1},onFocus(g){if(c.current)return;const h=gr(g.nativeEvent);if(l&&Ae(h))try{if(Ac()&&qh())throw Error();if(!h.matches(":focus-visible"))return}catch{if(!u.current&&!Fc(h))return}r(!0,g.nativeEvent,"focus")},onBlur(g){c.current=!1;const h=g.relatedTarget,m=Ae(h)&&h.hasAttribute(Wr("focus-guard"))&&h.getAttribute("data-type")==="outside";d.current=window.setTimeout(()=>{const p=wn(a?a.ownerDocument:document);!h&&p===a||st(o.floating.current,p)||st(a,p)||m||r(!1,g.nativeEvent,"focus")})}}}:{},[i,l,a,o,r])}const G0="active",X0="selected";function rd(t,e,n){const r=new Map,s=n==="item";let o=t;if(s&&t){const{[G0]:a,[X0]:i,...l}=t;o=l}return{...n==="floating"&&{tabIndex:-1},...o,...e.map(a=>{const i=a?a[n]:null;return typeof i=="function"?t?i(t):null:i}).concat(t).reduce((a,i)=>(i&&Object.entries(i).forEach(l=>{let[c,d]=l;if(!(s&&[G0,X0].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),a[c]=function(){for(var g,h=arguments.length,m=new Array(h),p=0;p<h;p++)m[p]=arguments[p];return(g=r.get(c))==null?void 0:g.map(b=>b(...m)).find(b=>b!==void 0)}}}else a[c]=d}),a),{})}}function K0(t){t===void 0&&(t=[]);const e=t,n=Y.useCallback(o=>rd(o,t,"reference"),e),r=Y.useCallback(o=>rd(o,t,"floating"),e),s=Y.useCallback(o=>rd(o,t,"item"),t.map(o=>o==null?void 0:o.item));return Y.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:s}),[n,r,s])}let Z0=!1;function mi(t,e,n){switch(t){case"vertical":return e;case"horizontal":return n;default:return e||n}}function Q0(t,e){return mi(e,t===Kc||t===Eo,t===Es||t===Ts)}function sd(t,e,n){return mi(e,t===Eo,n?t===Es:t===Ts)||t==="Enter"||t===" "||t===""}function I3(t,e,n){return mi(e,n?t===Es:t===Ts,t===Eo)}function J0(t,e,n){return mi(e,n?t===Ts:t===Es,t===Kc)}function A3(t,e){const{open:n,onOpenChange:r,refs:s,elements:{domReference:o,floating:a}}=t,{listRef:i,activeIndex:l,onNavigate:c=()=>{},enabled:d=!0,selectedIndex:u=null,allowEscape:g=!1,loop:h=!1,nested:m=!1,rtl:p=!1,virtual:b=!1,focusItemOnOpen:y="auto",focusItemOnHover:x=!0,openOnArrowKeyDown:k=!0,disabledIndices:v=void 0,orientation:w="vertical",cols:C=1,scrollItemIntoView:N=!0,virtualItemRef:T,itemSizes:I,dense:D=!1}=e;process.env.NODE_ENV!=="production"&&(g&&(h||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(" "))),w==="vertical"&&C>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const z=ui(),L=No(),P=kn(c),M=Y.useRef(y),E=Y.useRef(u??-1),S=Y.useRef(null),B=Y.useRef(!0),W=Y.useRef(P),X=Y.useRef(!!a),j=Y.useRef(!1),V=Y.useRef(!1),A=_n(v),R=_n(n),F=_n(N),[O,H]=Y.useState(),[q,Z]=Y.useState(),$=kn(function(G,ce,U){U===void 0&&(U=!1);const ne=G.current[ce.current];ne&&(b?(H(ne.id),L==null||L.events.emit("virtualfocus",ne),T&&(T.current=ne)):Un(ne,{preventScroll:!0,sync:qh()&&Ac()?Z0||j.current:!1}),requestAnimationFrame(()=>{const ae=F.current;ae&&ne&&(U||!B.current)&&(ne.scrollIntoView==null||ne.scrollIntoView(typeof ae=="boolean"?{block:"nearest",inline:"nearest"}:ae))}))});Be(()=>{document.createElement("div").focus({get preventScroll(){return Z0=!0,!1}})},[]),Be(()=>{d&&(n&&a?M.current&&u!=null&&(V.current=!0,E.current=u,P(u)):X.current&&(E.current=-1,W.current(null)))},[d,n,a,u,P]),Be(()=>{if(d&&n&&a)if(l==null){if(j.current=!1,u!=null)return;if(X.current&&(E.current=-1,$(i,E)),!X.current&&M.current&&(S.current!=null||M.current===!0&&S.current==null)){let G=0;const ce=()=>{i.current[0]==null?(G<2&&(G?requestAnimationFrame:queueMicrotask)(ce),G++):(E.current=S.current==null||sd(S.current,w,p)||m?Zc(i,A.current):C0(i,A.current),S.current=null,P(E.current))};ce()}}else To(i,l)||(E.current=l,$(i,E,V.current),V.current=!1)},[d,n,a,l,u,m,i,w,p,P,$,A]),Be(()=>{var G;if(!d||a||!L||b||!X.current)return;const ce=L.nodesRef.current,U=(G=ce.find(oe=>oe.id===z))==null||(G=G.context)==null?void 0:G.elements.floating,ne=wn(Ot(a)),ae=ce.some(oe=>oe.context&&st(oe.context.elements.floating,ne));U&&!ae&&B.current&&U.focus({preventScroll:!0})},[d,a,L,z,b]),Be(()=>{if(!d||!L||!b||z)return;function G(ce){Z(ce.id),T&&(T.current=ce)}return L.events.on("virtualfocus",G),()=>{L.events.off("virtualfocus",G)}},[d,L,b,z,T]),Be(()=>{W.current=P,X.current=!!a}),Be(()=>{n||(S.current=null)},[n]);const te=l!=null,le=Y.useMemo(()=>{function G(U){if(!n)return;const ne=i.current.indexOf(U);ne!==-1&&P(ne)}return{onFocus(U){let{currentTarget:ne}=U;G(ne)},onClick:U=>{let{currentTarget:ne}=U;return ne.focus({preventScroll:!0})},...x&&{onMouseMove(U){let{currentTarget:ne}=U;G(ne)},onPointerLeave(U){let{pointerType:ne}=U;!B.current||ne==="touch"||(E.current=-1,$(i,E),P(null),b||Un(s.floating.current,{preventScroll:!0}))}}}},[n,s,$,x,i,P,b]);return Y.useMemo(()=>{if(!d)return{};const G=A.current;function ce(ie){if(B.current=!1,j.current=!0,!R.current&&ie.currentTarget===s.floating.current)return;if(m&&J0(ie.key,w,p)){yt(ie),r(!1,ie.nativeEvent,"list-navigation"),bt(o)&&!b&&o.focus();return}const xe=E.current,be=Zc(i,G),De=C0(i,G);if(ie.key==="Home"&&(yt(ie),E.current=be,P(E.current)),ie.key==="End"&&(yt(ie),E.current=De,P(E.current)),C>1){const Qe=I||Array.from({length:i.current.length},()=>({width:1,height:1})),rt=o3(Qe,C,D),Jt=rt.findIndex($t=>$t!=null&&!(G!=null&&G.includes($t))),qt=rt.reduce(($t,Nr,en)=>Nr!=null&&!(G!=null&&G.includes(Nr))?en:$t,-1);if(E.current=rt[s3({current:rt.map($t=>$t!=null?i.current[$t]:null)},{event:ie,orientation:w,loop:h,cols:C,disabledIndices:i3([...G||[],void 0],rt),minIndex:Jt,maxIndex:qt,prevIndex:a3(E.current,Qe,rt,C,ie.key===Eo?"bl":ie.key===Ts?"tr":"tl"),stopEvent:!0})],P(E.current),w==="both")return}if(Q0(ie.key,w)){if(yt(ie),n&&!b&&wn(ie.currentTarget.ownerDocument)===ie.currentTarget){E.current=sd(ie.key,w,p)?be:De,P(E.current);return}sd(ie.key,w,p)?h?E.current=xe>=De?g&&xe!==i.current.length?-1:be:kt(i,{startingIndex:xe,disabledIndices:G}):E.current=Math.min(De,kt(i,{startingIndex:xe,disabledIndices:G})):h?E.current=xe<=be?g&&xe!==-1?i.current.length:De:kt(i,{startingIndex:xe,decrement:!0,disabledIndices:G}):E.current=Math.max(be,kt(i,{startingIndex:xe,decrement:!0,disabledIndices:G})),To(i,E.current)?P(null):P(E.current)}}function U(ie){y==="auto"&&Jh(ie.nativeEvent)&&(M.current=!0)}function ne(ie){M.current=y,y==="auto"&&Ic(ie.nativeEvent)&&(M.current=!0)}const ae=b&&n&&te&&{"aria-activedescendant":q||O},oe=i.current.find(ie=>(ie==null?void 0:ie.id)===O);return{reference:{...ae,onKeyDown(ie){B.current=!1;const xe=ie.key.indexOf("Arrow")===0,be=I3(ie.key,w,p),De=J0(ie.key,w,p),Qe=Q0(ie.key,w),rt=(m?be:Qe)||ie.key==="Enter"||ie.key.trim()==="";if(b&&n){const Nr=L==null?void 0:L.nodesRef.current.find(vc=>vc.parentId==null),en=L&&Nr?w3(L.nodesRef.current,Nr.id):null;if(xe&&en&&T){const vc=new KeyboardEvent("keydown",{key:ie.key,bubbles:!0});if(be||De){var Jt,qt;const NL=((Jt=en.context)==null?void 0:Jt.elements.domReference)===ie.currentTarget,C2=De&&!NL?(qt=en.context)==null?void 0:qt.elements.domReference:be?oe:null;C2&&(yt(ie),C2.dispatchEvent(vc),Z(void 0))}if(Qe&&en.context&&en.context.open&&en.parentId&&ie.currentTarget!==en.context.elements.domReference){var $t;yt(ie),($t=en.context.elements.domReference)==null||$t.dispatchEvent(vc);return}}return ce(ie)}if(!(!n&&!k&&xe)){if(rt&&(S.current=m&&Qe?null:ie.key),m){be&&(yt(ie),n?(E.current=Zc(i,G),P(E.current)):r(!0,ie.nativeEvent,"list-navigation"));return}Qe&&(u!=null&&(E.current=u),yt(ie),!n&&k?r(!0,ie.nativeEvent,"list-navigation"):ce(ie),n&&P(E.current))}},onFocus(){n&&P(null)},onPointerDown:ne,onMouseDown:U,onClick:U},floating:{"aria-orientation":w==="both"?void 0:w,...!$h(o)&&ae,onKeyDown:ce,onPointerMove(){B.current=!0}},item:le}},[o,s,O,q,A,R,i,d,w,p,b,n,te,m,u,k,g,C,h,y,P,r,le,L,T,I,D])}const L3=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function q0(t,e){var n;e===void 0&&(e={});const{open:r,floatingId:s}=t,{enabled:o=!0,role:a="dialog"}=e,i=(n=L3.get(a))!=null?n:a,l=di(),d=ui()!=null;return Y.useMemo(()=>{if(!o)return{};const u={id:s,...i&&{role:i}};return i==="tooltip"||a==="label"?{reference:{["aria-"+(a==="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"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},floating:{...u,...i==="menu"&&{"aria-labelledby":l}},item(g){let{active:h,selected:m}=g;const p={role:"option",...h&&{id:s+"-option"}};switch(a){case"select":return{...p,"aria-selected":h&&m};case"combobox":return{...p,...h&&{"aria-selected":!0}}}return{}}}},[o,a,i,r,s,l,d])}function R3(t,e){var n;const{open:r,dataRef:s}=t,{listRef:o,activeIndex:a,onMatch:i,onTypingChange:l,enabled:c=!0,findMatch:d=null,resetMs:u=750,ignoreKeys:g=[],selectedIndex:h=null}=e,m=Y.useRef(),p=Y.useRef(""),b=Y.useRef((n=h??a)!=null?n:-1),y=Y.useRef(null),x=kn(i),k=kn(l),v=_n(d),w=_n(g);return Be(()=>{r&&(clearTimeout(m.current),y.current=null,p.current="")},[r]),Be(()=>{if(r&&p.current===""){var C;b.current=(C=h??a)!=null?C:-1}},[r,h,a]),Y.useMemo(()=>{if(!c)return{};function C(I){I?s.current.typing||(s.current.typing=I,k(I)):s.current.typing&&(s.current.typing=I,k(I))}function N(I,D,z){const L=v.current?v.current(D,z):D.find(P=>(P==null?void 0:P.toLocaleLowerCase().indexOf(z.toLocaleLowerCase()))===0);return L?I.indexOf(L):-1}function T(I){const D=o.current;if(p.current.length>0&&p.current[0]!==" "&&(N(D,D,p.current)===-1?C(!1):I.key===" "&&yt(I)),D==null||w.current.includes(I.key)||I.key.length!==1||I.ctrlKey||I.metaKey||I.altKey)return;r&&I.key!==" "&&(yt(I),C(!0)),D.every(M=>{var E,S;return M?((E=M[0])==null?void 0:E.toLocaleLowerCase())!==((S=M[1])==null?void 0:S.toLocaleLowerCase()):!0})&&p.current===I.key&&(p.current="",b.current=y.current),p.current+=I.key,clearTimeout(m.current),m.current=setTimeout(()=>{p.current="",b.current=y.current,C(!1)},u);const L=b.current,P=N(D,[...D.slice((L||0)+1),...D.slice(0,(L||0)+1)],p.current);P!==-1?(x(P),y.current=P):I.key!==" "&&(p.current="",C(!1))}return{reference:{onKeyDown:T},floating:{onKeyDown:T,onKeyUp(I){I.key===" "&&C(!1)}}}},[c,r,s,o,u,w,v,x,k])}function $0(t,e){const[n,r]=t;let s=!1;const o=e.length;for(let a=0,i=o-1;a<o;i=a++){const[l,c]=e[a]||[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 F3(t,e){return t[0]>=e.x&&t[0]<=e.x+e.width&&t[1]>=e.y&&t[1]<=e.y+e.height}function B3(t){t===void 0&&(t={});const{buffer:e=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=t;let s,o=!1,a=null,i=null,l=performance.now();function c(u,g){const h=performance.now(),m=h-l;if(a===null||i===null||m===0)return a=u,i=g,l=h,null;const p=u-a,b=g-i,x=Math.sqrt(p*p+b*b)/m;return a=u,i=g,l=h,x}const d=u=>{let{x:g,y:h,placement:m,elements:p,onClose:b,nodeId:y,tree:x}=u;return function(v){function w(){clearTimeout(s),b()}if(clearTimeout(s),!p.domReference||!p.floating||m==null||g==null||h==null)return;const{clientX:C,clientY:N}=v,T=[C,N],I=gr(v),D=v.type==="mouseleave",z=st(p.floating,I),L=st(p.domReference,I),P=p.domReference.getBoundingClientRect(),M=p.floating.getBoundingClientRect(),E=m.split("-")[0],S=g>M.right-M.width/2,B=h>M.bottom-M.height/2,W=F3(T,P),X=M.width>P.width,j=M.height>P.height,V=(X?P:M).left,A=(X?P:M).right,R=(j?P:M).top,F=(j?P:M).bottom;if(z&&(o=!0,!D))return;if(L&&(o=!1),L&&!D){o=!0;return}if(D&&Ae(v.relatedTarget)&&st(p.floating,v.relatedTarget)||x&&zr(x.nodesRef.current,y).some(q=>{let{context:Z}=q;return Z==null?void 0:Z.open}))return;if(E==="top"&&h>=P.bottom-1||E==="bottom"&&h<=P.top+1||E==="left"&&g>=P.right-1||E==="right"&&g<=P.left+1)return w();let O=[];switch(E){case"top":O=[[V,P.top+1],[V,M.bottom-1],[A,M.bottom-1],[A,P.top+1]];break;case"bottom":O=[[V,M.top+1],[V,P.bottom-1],[A,P.bottom-1],[A,M.top+1]];break;case"left":O=[[M.right-1,F],[M.right-1,R],[P.left+1,R],[P.left+1,F]];break;case"right":O=[[P.right-1,F],[P.right-1,R],[M.left+1,R],[M.left+1,F]];break}function H(q){let[Z,$]=q;switch(E){case"top":{const te=[X?Z+e/2:S?Z+e*4:Z-e*4,$+e+1],le=[X?Z-e/2:S?Z+e*4:Z-e*4,$+e+1],G=[[M.left,S||X?M.bottom-e:M.top],[M.right,S?X?M.bottom-e:M.top:M.bottom-e]];return[te,le,...G]}case"bottom":{const te=[X?Z+e/2:S?Z+e*4:Z-e*4,$-e],le=[X?Z-e/2:S?Z+e*4:Z-e*4,$-e],G=[[M.left,S||X?M.top+e:M.bottom],[M.right,S?X?M.top+e:M.bottom:M.top+e]];return[te,le,...G]}case"left":{const te=[Z+e+1,j?$+e/2:B?$+e*4:$-e*4],le=[Z+e+1,j?$-e/2:B?$+e*4:$-e*4];return[...[[B||j?M.right-e:M.left,M.top],[B?j?M.right-e:M.left:M.right-e,M.bottom]],te,le]}case"right":{const te=[Z-e,j?$+e/2:B?$+e*4:$-e*4],le=[Z-e,j?$-e/2:B?$+e*4:$-e*4],G=[[B||j?M.left+e:M.right,M.top],[B?j?M.left+e:M.right:M.left+e,M.bottom]];return[te,le,...G]}}}if(!$0([C,N],O)){if(o&&!W)return w();if(!D&&r){const q=c(v.clientX,v.clientY);if(q!==null&&q<.1)return w()}$0([C,N],H([g,h]))?!o&&r&&(s=window.setTimeout(w,40)):w()}}};return d.__options={blockPointerEvents:n},d}const W3=({arrowRef:t,placement:e})=>{const n=[];return n.push(j5(8)),n.push(e==="auto"?L5():A5()),n.push(I5({padding:8})),t!=null&&t.current&&n.push(R5({element:t.current})),n},z3=({placement:t})=>t==="auto"?void 0:t,H3=({placement:t})=>({top:"bottom",right:"left",bottom:"top",left:"right"})[t.split("-")[0]],eg=({open:t,arrowRef:e,placement:n="top",setOpen:r})=>U0({placement:z3({placement:n}),open:t,onOpenChange:r,whileElementsMounted:g0,middleware:W3({placement:n,arrowRef:e})}),tg=({context:t,trigger:e,role:n="tooltip",interactions:r=[]})=>K0([H0(t,{enabled:e==="click"}),b3(t,{enabled:e==="hover",handleClose:B3()}),Y0(t),q0(t,{role:n}),...r]),ng=_.createContext(void 0);function od(){const t=_.useContext(ng);if(!t)throw new Error("useDropdownContext should be used within the DropdownContext provider!");return t}const ad=({className:t,theme:e={},...n})=>{const{theme:r}=od(),s=e.divider??r.floating.divider;return f.jsx("div",{className:Q(s,t),...n})},rg=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=od(),o=n.header??s.floating.header;return f.jsxs(f.Fragment,{children:[f.jsx("div",{className:Q(o,e),...r,children:t}),f.jsx(ad,{})]})},id=_.forwardRef(({children:t,className:e,icon:n,onClick:r,theme:s={},...o},a)=>{const{ref:i,index:l}=u3({label:typeof t=="string"?t:void 0}),c=_0([a,i]),{theme:d,activeIndex:u,dismissOnClick:g,getItemProps:h,handleSelect:m}=od(),p=u===l,b=re(d.floating.item,s),y=o;return f.jsx("li",{role:"menuitem",className:b.container,children:f.jsxs(Mc,{ref:c,className:Q(b.base,e),...y,...h({onClick:()=>{r==null||r(),g&&m(null)}}),tabIndex:p?0:-1,children:[n&&f.jsx(n,{className:b.icon}),t]})})});id.displayName="DropdownItem";const V3={top:r1,right:hh,bottom:fh,left:n1},Y3=({refs:t,children:e,inline:n,theme:r,disabled:s,setButtonWidth:o,getReferenceProps:a,renderTrigger:i,...l})=>{const c=t.reference,d=a();if(_.useEffect(()=>{c.current&&(o==null||o(c.current.clientWidth))},[c,o]),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(Lh,{...l,disabled:s,type:"button",ref:t.setReference,...d,children:e})},sg=({children:t,className:e,dismissOnClick:n=!0,theme:r={},renderTrigger:s,...o})=>{const[a,i]=_.useState(!1),[l,c]=_.useState(null),[d,u]=_.useState(null),[g,h]=_.useState(void 0),m=_.useRef([]),p=_.useRef([]),b=re(pe().dropdown,r),y=o,x=o["data-testid"]||"flowbite-dropdown-target",{placement:k=o.inline?"bottom-start":"bottom",trigger:v="click",label:w,inline:C,arrowIcon:N=!0,...T}=y,I=_.useCallback(j=>{u(j),i(!1)},[]),D=_.useCallback(j=>{a?c(j):I(j)},[a,I]),{context:z,floatingStyles:L,refs:P}=eg({open:a,setOpen:i,placement:k}),M=A3(z,{listRef:m,activeIndex:l,selectedIndex:d,onNavigate:c}),E=R3(z,{listRef:p,activeIndex:l,selectedIndex:d,onMatch:D}),{getReferenceProps:S,getFloatingProps:B,getItemProps:W}=tg({context:z,role:"menu",trigger:v,interactions:[M,E]}),X=_.useMemo(()=>{const[j]=k.split("-");return V3[j]??fh},[k]);return f.jsxs(ng.Provider,{value:{theme:b,activeIndex:l,dismissOnClick:n,getItemProps:W,handleSelect:I},children:[f.jsxs(Y3,{...T,refs:P,inline:C,theme:b,"data-testid":x,className:Q(b.floating.target,T.className),setButtonWidth:h,getReferenceProps:S,renderTrigger:s,children:[w,N&&f.jsx(X,{className:b.arrowIcon})]}),a&&f.jsx(B0,{context:z,modal:!1,children:f.jsx("div",{ref:P.setFloating,style:{...L,minWidth:g},"data-testid":"flowbite-dropdown","aria-expanded":a,...B({className:Q(b.floating.base,b.floating.animation,"duration-100",!a&&b.floating.hidden,b.floating.style.auto,e)}),children:f.jsx(d3,{elementsRef:m,labelsRef:p,children:f.jsx("ul",{className:b.content,tabIndex:-1,children:t})})})})]})};sg.displayName="Dropdown",rg.displayName="Dropdown.Header",ad.displayName="Dropdown.Divider";const U3=Object.assign(sg,{Item:id,Header:rg,Divider:ad}),og=_.forwardRef(({className:t,color:e="gray",helperText:n,sizing:r="md",theme:s={},...o},a)=>{const i=re(pe().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]),...o,type:"file",ref:a})})}),n&&f.jsx(So,{color:e,children:n})]})});og.displayName="FileInput";const G3=_.forwardRef(({label:t,helperText:e,color:n="default",sizing:r="md",variant:s,disabled:o=!1,theme:a={},className:i,...l},c)=>{const d=_.useId(),u=re(pe().floatingLabel,a);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:o,...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})]})});G3.displayName="FloatingLabel";const ag=({alt:t,className:e,children:n,href:r,name:s,src:o,theme:a={},...i})=>{const l=re(pe().footer.brand,a);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:o,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:o,className:Q(l.img,e),...i})})},ig=({by:t,className:e,href:n,theme:r={},year:s,...o})=>{const a=re(pe().footer.copyright,r);return f.jsxs("div",{"data-testid":"flowbite-footer-copyright",className:Q(a.base,e),...o,children:["© ",s,n?f.jsx("a",{href:n,className:a.href,children:t}):f.jsx("span",{"data-testid":"flowbite-footer-copyright-span",className:a.span,children:t})]})},lg=({className:t,theme:e={},...n})=>{const r=re(pe().footer.divider,e);return f.jsx("hr",{"data-testid":"footer-divider",className:Q(r.base,t),...n})},cg=({ariaLabel:t,className:e,href:n,icon:r,theme:s={},...o})=>{const a=re(pe().footer.icon,s);return f.jsx("div",{children:n?f.jsx("a",{"aria-label":t,"data-testid":"flowbite-footer-icon",href:n,className:Q(a.base,e),...o,children:f.jsx(r,{className:a.size})}):f.jsx(r,{"data-testid":"flowbite-footer-icon",className:a.size,...o})})},dg=({as:t="a",children:e,className:n,href:r,theme:s={},...o})=>{const a=re(pe().footer.groupLink.link,s);return f.jsx("li",{className:Q(a.base,n),children:f.jsx(t,{href:r,className:a.href,...o,children:e})})},ug=({children:t,className:e,col:n=!1,theme:r={},...s})=>{const o=re(pe().footer.groupLink,r);return f.jsx("ul",{"data-testid":"footer-groupLink",className:Q(o.base,n&&o.col,e),...s,children:t})},fg=({as:t="h2",className:e,theme:n={},title:r,...s})=>{const o=re(pe().footer.title,n);return f.jsx(t,{"data-testid":"flowbite-footer-title",className:Q(o.base,e),...s,children:r})},hg=({bgDark:t=!1,children:e,className:n,container:r=!1,theme:s={},...o})=>{const a=re(pe().footer,s);return f.jsx("footer",{"data-testid":"flowbite-footer",className:Q(a.root.base,t&&a.root.bgDark,r&&a.root.container,n),...o,children:e})};hg.displayName="Footer",ig.displayName="Footer.Copyright",dg.displayName="Footer.Link",ag.displayName="Footer.Brand",ug.displayName="Footer.LinkGroup",cg.displayName="Footer.Icon",fg.displayName="Footer.Title",lg.displayName="Footer.Divider",Object.assign(hg,{Copyright:ig,Link:dg,LinkGroup:ug,Brand:ag,Icon:cg,Title:fg,Divider:lg});const pi=({children:t,className:e,color:n="default",disabled:r=!1,theme:s={},value:o,...a})=>{const i=re(pe().label,s);return f.jsx("label",{className:Q(i.root.base,i.root.colors[n],r&&i.root.disabled,e),"data-testid":"flowbite-label",...a,children:o??t??""})};pi.displayName="Label";const gg=({children:t,className:e,icon:n,theme:r={},...s})=>{const o=re(pe().list.item,r);return f.jsxs("li",{className:Q(o.withIcon[n?"on":"off"],e),...s,children:[n&&f.jsx(n,{className:Q(o.icon)}),t]})},mg=({children:t,className:e,unstyled:n,nested:r,ordered:s,horizontal:o,theme:a={},...i})=>{const l=re(pe().list,a),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,o&&l.root.horizontal,e),...i,children:t})};mg.displayName="List",gg.displayName="List.Item",Object.assign(mg,{Item:gg});const pg=({active:t,children:e,className:n,href:r,icon:s,onClick:o,theme:a={},disabled:i,...l})=>{const c=re(pe().listGroup.item,a),d=typeof r<"u",u=d?"a":"button";return f.jsx("li",{className:Q(c.base,n),children:f.jsxs(u,{href:r,onClick:o,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]})})},bg=({children:t,className:e,theme:n={},...r})=>{const s=re(pe().listGroup,n);return f.jsx("ul",{className:Q(s.root.base,e),...r,children:t})};bg.displayName="ListGroup",pg.displayName="ListGroup.Item",Object.assign(bg,{Item:pg});const yg=_.createContext(void 0);function ld(){const t=_.useContext(yg);if(!t)throw new Error("useModalContext should be used within the ModalContext provider!");return t}const wg=({children:t,className:e,theme:n={},...r})=>{const{theme:s,popup:o}=ld(),a=re(s.body,n);return f.jsx("div",{className:Q(a.base,o&&[a.popup],e),...r,children:t})},vg=({children:t,className:e,theme:n={},...r})=>{const{theme:s,popup:o}=ld(),a=re(s.footer,n);return f.jsx("div",{className:Q(a.base,!o&&a.popup,e),...r,children:t})},xg=({as:t="h3",children:e,className:n,theme:r={},id:s,...o})=>{const a=_.useId(),i=s||a,{theme:l,popup:c,onClose:d,setHeaderId:u}=ld(),g=re(l.header,r);return _.useLayoutEffect(()=>(u(i),()=>u(void 0)),[i,u]),f.jsxs("div",{className:Q(g.base,c&&g.popup,n),...o,children:[f.jsx(t,{id:i,className:g.title,children:e}),f.jsx("button",{"aria-label":"Close",className:g.close.base,type:"button",onClick:d,children:f.jsx(s1,{"aria-hidden":!0,className:g.close.icon})})]})},kg=_.forwardRef(({children:t,className:e,dismissible:n=!1,onClose:r,popup:s,position:o="center",root:a,show:i,size:l="2xl",theme:c={},initialFocus:d,...u},g)=>{const[h,m]=_.useState(void 0),p=re(pe().modal,c),{context:b}=U0({open:i,onOpenChange:()=>r&&r()}),y=_0([b.refs.setFloating,g]),x=H0(b),k=Y0(b,{outsidePressEvent:"mousedown",enabled:n}),v=q0(b),{getFloatingProps:w}=K0([x,k,v]);return i?f.jsx(yg.Provider,{value:{theme:p,popup:s,onClose:r,setHeaderId:m},children:f.jsx(O3,{root:a,children:f.jsx(T3,{lockScroll:!0,"data-testid":"modal-overlay",className:Q(p.root.base,p.root.positions[o],i?p.root.show.on:p.root.show.off,e),...u,children:f.jsx(B0,{context:b,initialFocus:d,children:f.jsx("div",{ref:y,...w(u),"aria-labelledby":h,className:Q(p.content.base,p.root.sizes[l]),children:f.jsx("div",{className:p.content.inner,children:t})})})})})}):null});kg.displayName="Modal",xg.displayName="Modal.Header",wg.displayName="Modal.Body",vg.displayName="Modal.Footer",Object.assign(kg,{Header:xg,Body:wg,Footer:vg});const _g=_.createContext(void 0);function bi(){const t=_.useContext(_g);if(!t)throw new Error("useNavBarContext should be used within the NavbarContext provider!");return t}const Cg=({as:t="a",children:e,className:n,theme:r={},...s})=>{const{theme:o}=bi(),a=re(o.brand,r);return f.jsx(t,{className:Q(a.base,n),...s,children:e})},Sg=({children:t,className:e,theme:n={},...r})=>{const{theme:s,isOpen:o}=bi(),a=re(s.collapse,n);return f.jsx("div",{"data-testid":"flowbite-navbar-collapse",className:Q(a.base,a.hidden[o?"off":"on"],e),...r,children:f.jsx("ul",{className:a.list,children:t})})},Mg=({active:t,as:e="a",disabled:n,children:r,className:s,theme:o={},onClick:a,...i})=>{const{theme:l,setIsOpen:c}=bi(),d=re(l.link,o),u=g=>{c(!1),a==null||a(g)};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 X3(t){return Ie({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 Ns(t){return Ie({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 K3(t){return Ie({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 cd(t){return Ie({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 Z3(t){return Ie({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 Q3(t){return Ie({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 J3(t){return Ie({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 Og=({barIcon:t=X3,className:e,theme:n={},...r})=>{const{theme:s,isOpen:o,setIsOpen:a}=bi(),i=re(s.toggle,n),l=()=>{a(!o)};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})]})},Dg=({border:t,children:e,className:n,fluid:r=!1,menuOpen:s,rounded:o,theme:a={},...i})=>{const[l,c]=_.useState(s),d=re(pe().navbar,a);return f.jsx(_g.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[o?"on":"off"],n),...i,children:f.jsx("div",{className:Q(d.root.inner.base,d.root.inner.fluid[r?"on":"off"]),children:e})})})};Dg.displayName="Navbar",Cg.displayName="Navbar.Brand",Sg.displayName="Navbar.Collapse",Mg.displayName="Navbar.Link",Og.displayName="Navbar.Toggle",Object.assign(Dg,{Brand:Cg,Collapse:Sg,Link:Mg,Toggle:Og});const q3=(t,e)=>t>=e?[]:[...Array(e-t+1).keys()].map(n=>n+t),dd=({active:t,children:e,className:n,onClick:r,theme:s={},...o})=>{const a=re(pe().pagination,s);return f.jsx("button",{type:"button",className:Q(t&&a.pages.selector.active,n),onClick:r,...o,children:e})};dd.displayName="Pagination.Button";const ud=({children:t,className:e,onClick:n,theme:r={},disabled:s=!1,...o})=>{const a=re(pe().pagination,r);return f.jsx("button",{type:"button",className:Q(s&&a.pages.selector.disabled,e),disabled:s,onClick:n,...o,children:t})};ud.displayName="Pagination.Navigation";const Eg=({className:t,currentPage:e,layout:n="pagination",nextLabel:r="Next",onPageChange:s,previousLabel:o="Previous",renderPaginationButton:a=u=>f.jsx(dd,{...u}),showIcons:i=!1,theme:l={},totalPages:c,...d})=>{const u=re(pe().pagination,l),g=Math.min(Math.max(n==="pagination"?e+2:e+4,5),c),h=Math.max(1,g-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:h})," to ",f.jsx("span",{className:u.layout.table.span,children:g})," 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(ud,{className:Q(u.pages.previous.base,i&&u.pages.showIcon),onClick:p,disabled:e===1,children:[i&&f.jsx(q2,{"aria-hidden":!0,className:u.pages.previous.icon}),o]})}),n==="pagination"&&q3(h,g).map(b=>f.jsx("li",{"aria-current":b===e?"page":void 0,children:a({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(ud,{className:Q(u.pages.next.base,i&&u.pages.showIcon),onClick:m,disabled:e===c,children:[r,i&&f.jsx($2,{"aria-hidden":!0,className:u.pages.next.icon})]})})]})]})};Eg.displayName="Pagination",Object.assign(Eg,{Button:dd});const Tg=_.forwardRef(({className:t,theme:e={},...n},r)=>{const s=re(pe().radio,e);return f.jsx("input",{ref:r,type:"radio",className:Q(s.root.base,t),...n})});Tg.displayName="Radio";const $3=_.forwardRef(({className:t,sizing:e="md",theme:n={},...r},s)=>{const o=re(pe().rangeSlider,n);return f.jsx(f.Fragment,{children:f.jsx("div",{"data-testid":"flowbite-range-slider",className:Q(o.root.base,t),children:f.jsx("div",{className:o.field.base,children:f.jsx("input",{ref:s,type:"range",className:Q(o.field.input.base,o.field.input.sizes[e]),...r})})})})});$3.displayName="RangeSlider";const Pg=({children:t,className:e,percentFilled:n=0,theme:r={},...s})=>{const o=re(pe().ratingAdvanced,r);return f.jsxs("div",{className:Q(o.base,e),...s,children:[f.jsx("span",{className:o.label,children:t}),f.jsx("div",{className:o.progress.base,children:f.jsx("div",{className:o.progress.fill,"data-testid":"flowbite-rating-fill",style:{width:`${n}%`}})}),f.jsx("span",{className:o.progress.label,children:`${n}%`})]})},Ng=_.createContext(void 0);function e_(){const t=_.useContext(Ng);if(!t)throw new Error("useRatingContext should be used within the RatingContext provider!");return t}const jg=({className:t,filled:e=!0,starIcon:n=e1,theme:r={},...s})=>{const{theme:o,size:a="sm"}=e_(),i=re(o.star,r);return f.jsx(n,{"data-testid":"flowbite-rating-star",className:Q(i.sizes[a],i[e?"filled":"empty"],t),...s})},Ig=({children:t,className:e,size:n="sm",theme:r={},...s})=>{const o=re(pe().rating,r);return f.jsx(Ng.Provider,{value:{theme:o,size:n},children:f.jsx("div",{className:Q(o.root.base,e),...s,children:t})})};Ig.displayName="Rating",jg.displayName="Rating.Star",Pg.displayName="Rating.Advanced",Object.assign(Ig,{Star:jg,Advanced:Pg});const t_=_.forwardRef(({addon:t,children:e,className:n,color:r="gray",helperText:s,icon:o,shadow:a,sizing:i="md",theme:l={},...c},d)=>{const u=re(pe().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:[o&&f.jsx("div",{className:u.field.icon.base,children:f.jsx(o,{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[o?"on":"off"],u.field.select.withAddon[t?"on":"off"],u.field.select.withShadow[a?"on":"off"]),...c,ref:d,children:e}),s&&f.jsx(So,{color:r,children:s})]})]})});t_.displayName="Select";const n_=({animation:t="duration-300",arrow:e=!0,children:n,className:r,content:s,placement:o="top",style:a="dark",theme:i,trigger:l="hover",minWidth:c,...d})=>{const u=_.useRef(null),[g,h]=_.useState(!1),m=eg({open:g,placement:o,arrowRef:u,setOpen:h}),{context:p,middlewareData:{arrow:{x:b,y}={}},refs:x,strategy:k,update:v,x:w,y:C}=m,N=j3(p),{getFloatingProps:T,getReferenceProps:I}=tg({context:p,role:"tooltip",trigger:l,interactions:[N]});return _.useEffect(()=>{if(x.reference.current&&x.floating.current&&g)return g0(x.reference.current,x.floating.current,v)},[g,x.floating,x.reference,v]),f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:x.setReference,className:i.target,"data-testid":"flowbite-tooltip-target",...I(),children:n}),f.jsxs("div",{ref:x.setFloating,"data-testid":"flowbite-tooltip",...T({className:Q(i.base,t&&`${i.animation} ${t}`,!g&&i.hidden,i.style[a],r),style:{position:k,top:C??" ",left:w??" ",minWidth:c},...d}),children:[f.jsx("div",{className:i.content,children:s}),e&&f.jsx("div",{className:Q(i.arrow.base,a==="dark"&&i.arrow.style.dark,a==="light"&&i.arrow.style.light,a==="auto"&&i.arrow.style.auto),"data-testid":"flowbite-tooltip-arrow",ref:u,style:{top:y??" ",left:b??" ",right:" ",bottom:" ",[H3({placement:m.placement})]:i.arrow.placement},children:" "})]})]})},yi=({animation:t="duration-300",arrow:e=!0,children:n,className:r,content:s,placement:o="top",style:a="dark",theme:i={},trigger:l="hover",...c})=>{const d=re(pe().tooltip,i);return f.jsx(n_,{animation:t,arrow:e,content:s,placement:o,style:a,theme:d,trigger:l,className:r,...c,children:n})};yi.displayName="Tooltip";const Ag=_.createContext(void 0);function js(){const t=_.useContext(Ag);if(!t)throw new Error("useSidebarContext should be used within the SidebarContext provider!");return t}const fd=_.createContext(void 0);function r_(){const t=_.useContext(fd);if(!t)throw new Error("useSidebarItemContext should be used within the SidebarItemContext provider!");return t}const Lg=({children:t,className:e,icon:n,label:r,chevronIcon:s=_c,renderChevronIcon:o,open:a=!1,theme:i={},...l})=>{const c=_.useId(),[d,u]=_.useState(a),{theme:g,isCollapsed:h}=js(),m=re(g.collapse,i);_.useEffect(()=>u(a),[a]);const p=({children:b})=>f.jsx("li",{children:h&&!d?f.jsx(yi,{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"])}),h?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}),o?o(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(fd.Provider,{value:{isInsideCollapse:!0},children:t})})]})};Lg.displayName="Sidebar.Collapse";const Rg=({children:t,color:e="info",className:n,theme:r={},...s})=>{const{theme:o,isCollapsed:a}=js(),i=re(o.cta,r);return f.jsx("div",{"data-testid":"sidebar-cta",hidden:a,className:Q(i.base,i.color[e],n),...s,children:t})};Rg.displayName="Sidebar.CTA";const s_=({id:t,theme:e,isCollapsed:n,tooltipChildren:r,children:s,...o})=>f.jsx("li",{...o,children:n?f.jsx(yi,{content:f.jsx(Fg,{id:t,theme:e,children:r}),placement:"right",children:s}):s}),Fg=({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}),Bg=_.forwardRef(({active:t,as:e="a",children:n,className:r,icon:s,label:o,labelColor:a="info",theme:i={},...l},c)=>{var p,b,y,x;const d=_.useId(),{theme:u,isCollapsed:g}=js(),{isInsideCollapse:h}=r_(),m=re(u.item,i);return f.jsx(s_,{theme:m,className:m.listItem,id:d,isCollapsed:g,tooltipChildren:n,children:f.jsxs(e,{"aria-labelledby":`flowbite-sidebar-item-${d}`,ref:c,className:Q(m.base,t&&m.active,!g&&h&&((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))}),g&&!s&&f.jsx("span",{className:(x=m.collapsed)==null?void 0:x.noIcon,children:n.charAt(0).toLocaleUpperCase()??"?"}),!g&&f.jsx(Fg,{id:d,theme:m,children:n}),!g&&o&&f.jsx(Th,{color:a,"data-testid":"flowbite-sidebar-label",hidden:g,className:m.label,children:o})]})})});Bg.displayName="Sidebar.Item";const Wg=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=js(),o=re(s.itemGroup,n);return f.jsx("ul",{"data-testid":"flowbite-sidebar-item-group",className:Q(o.base,e),...r,children:f.jsx(fd.Provider,{value:{isInsideCollapse:!1},children:t})})};Wg.displayName="Sidebar.ItemGroup";const zg=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=js(),o=re(s.items,n);return f.jsx("div",{className:Q(o.base,e),"data-testid":"flowbite-sidebar-items",...r,children:t})};zg.displayName="Sidebar.Items";const Hg=({children:t,className:e,href:n,img:r,imgAlt:s="",theme:o={},...a})=>{const i=_.useId(),{theme:l,isCollapsed:c}=js(),d=re(l.logo,o);return f.jsxs("a",{"aria-labelledby":`flowbite-sidebar-logo-${i}`,href:n,className:Q(d.base,e),...a,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})]})};Hg.displayName="Sidebar.Logo";const Vg=({children:t,as:e="nav",collapseBehavior:n="collapse",collapsed:r=!1,theme:s={},className:o,...a})=>{const i=re(pe().sidebar,s);return f.jsx(Ag.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"],o),...a,children:f.jsx("div",{className:i.root.inner,children:t})})})};Vg.displayName="Sidebar",Object.assign(Vg,{Collapse:Lg,CTA:Rg,Item:Bg,Items:zg,ItemGroup:Wg,Logo:Hg});const Yg=_.createContext(void 0);function o_(){const t=_.useContext(Yg);if(!t)throw new Error("useTableBodyContext should be used within the TableBodyContext provider!");return t}const Ug=_.createContext(void 0);function hd(){const t=_.useContext(Ug);if(!t)throw new Error("useTableContext should be used within the TableContext provider!");return t}const Gg=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:o}=hd(),a=re(o.body,n);return f.jsx(Yg.Provider,{value:{theme:a},children:f.jsx("tbody",{className:Q(a.base,e),ref:s,...r,children:t})})});Gg.displayName="Table.Body";const Xg=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:o}=o_(),a=re(o.cell,n);return f.jsx("td",{className:Q(a.base,e),ref:s,...r,children:t})});Xg.displayName="Table.Cell";const Kg=_.createContext(void 0);function a_(){const t=_.useContext(Kg);if(!t)throw new Error("useTableHeadContext should be used within the TableHeadContext provider!");return t}const Zg=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:o}=hd(),a=re(o.head,n);return f.jsx(Kg.Provider,{value:{theme:a},children:f.jsx("thead",{className:Q(a.base,e),ref:s,...r,children:f.jsx("tr",{children:t})})})});Zg.displayName="Table.Head";const Qg=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:o}=a_(),a=re(o.cell,n);return f.jsx("th",{className:Q(a.base,e),ref:s,...r,children:t})});Qg.displayName="Table.HeadCell";const Jg=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:o,hoverable:a,striped:i}=hd(),l=re(o.row,n);return f.jsx("tr",{ref:s,"data-testid":"table-row-element",className:Q(l.base,i&&l.striped,a&&l.hovered,e),...r,children:t})});Jg.displayName="Table.Row";const qg=_.forwardRef(({children:t,className:e,striped:n,hoverable:r,theme:s={},...o},a)=>{const i=re(pe().table,s);return f.jsx("div",{"data-testid":"table-element",className:Q(i.root.wrapper),children:f.jsxs(Ug.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),...o,ref:a,children:t})]})})});qg.displayName="Table";const Je=Object.assign(qg,{Head:Zg,Body:Gg,Row:Jg,Cell:Xg,HeadCell:Qg}),$g=({children:t,className:e})=>f.jsx("div",{className:e,children:t});$g.displayName="Tabs.Item";const em=_.forwardRef(({children:t,className:e,onActiveTabChange:n,style:r="default",theme:s={},...o},a)=>{const i=re(pe().tabs,s),l=_.useId(),c=_.useMemo(()=>_.Children.map(_.Children.toArray(t),({props:v})=>v),[t]),d=_.useRef([]),[u,g]=_.useState(Math.max(0,c.findIndex(v=>v.active))),[h,m]=_.useState(-1),p=v=>{g(v),n&&n(v)},b=({target:v})=>{p(v),m(v)},y=({event:v,target:w})=>{v.key==="ArrowLeft"&&m(Math.max(0,h-1)),v.key==="ArrowRight"&&m(Math.min(c.length-1,h+1)),v.key==="Enter"&&(p(w),m(w))},x=i.tablist.tabitem.styles[r],k=i.tabitemcontainer.styles[r];return _.useEffect(()=>{var v;(v=d.current[h])==null||v.focus()},[h]),_.useImperativeHandle(a,()=>({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),...o,children:c.map((v,w)=>f.jsxs("button",{type:"button","aria-controls":`${l}-tabpanel-${w}`,"aria-selected":w===u,className:Q(i.tablist.tabitem.base,x.base,w===u&&x.active.on,w!==u&&!v.disabled&&x.active.off),disabled:v.disabled,id:`${l}-tab-${w}`,onClick:()=>b({target:w}),onKeyDown:C=>y({event:C,target:w}),ref:C=>d.current[w]=C,role:"tab",tabIndex:w===h?0:-1,style:{zIndex:w===h?2:1},children:[v.icon&&f.jsx(v.icon,{className:i.tablist.tabitem.icon}),v.title]},w))}),f.jsx("div",{className:Q(i.tabitemcontainer.base,k),children:c.map((v,w)=>f.jsx("div",{"aria-labelledby":`${l}-tab-${w}`,className:i.tabpanel,hidden:w!==u,id:`${l}-tabpanel-${w}`,role:"tabpanel",tabIndex:0,children:v.children},w))})]})});em.displayName="Tabs",Object.assign(em,{Item:$g});const i_=_.forwardRef(({className:t,color:e="gray",helperText:n,shadow:r,theme:s={},...o},a)=>{const i=re(pe().textarea,s);return f.jsxs(f.Fragment,{children:[f.jsx("textarea",{ref:a,className:Q(i.base,i.colors[e],i.withShadow[r?"on":"off"],t),...o}),n&&f.jsx(So,{color:e,children:n})]})});i_.displayName="Textarea";const tm=_.createContext(void 0);function gd(){const t=_.useContext(tm);if(!t)throw new Error("useTimelineContentContext should be used within the TimelineContentContext provider!");return t}const nm=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=gd(),o=re(s.body,n);return f.jsx("div",{className:Q(o.base,e),...r,children:t})},rm=_.createContext(void 0);function md(){const t=_.useContext(rm);if(!t)throw new Error("useTimelineContext should be used within the TimelineContext provider!");return t}const sm=_.createContext(void 0);function om(){const t=_.useContext(sm);if(!t)throw new Error("useTimelineItemContext should be used within the TimelineItemContext provider!");return t}const am=({children:t,className:e,theme:n={},...r})=>{const{horizontal:s}=md(),{theme:o}=om(),a=re(o.content,n);return f.jsx(tm.Provider,{value:{theme:a},children:f.jsx("div",{"data-testid":"timeline-content",className:Q(s&&a.root.base,e),...r,children:t})})},im=({children:t,className:e,theme:n={},...r})=>{const{theme:s,horizontal:o}=md(),a=re(s.item,n);return f.jsx(sm.Provider,{value:{theme:a},children:f.jsx("li",{"data-testid":"timeline-item",className:Q(o&&a.root.horizontal,!o&&a.root.vertical,e),...r,children:t})})},lm=({children:t,className:e,icon:n,theme:r={},...s})=>{const{horizontal:o}=md(),{theme:a}=om(),i=re(a.point,r);return f.jsxs("div",{"data-testid":"timeline-point",className:Q(o&&i.horizontal,!o&&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(o&&i.marker.base.horizontal,!o&&i.marker.base.vertical)}),o&&f.jsx("div",{className:Q(i.line)})]})},cm=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=gd(),o=re(s.time,n);return f.jsx("time",{className:Q(o.base,e),...r,children:t})},dm=({as:t="h3",children:e,className:n,theme:r={},...s})=>{const{theme:o}=gd(),a=re(o.title,r);return f.jsx(t,{className:Q(a.base,n),...s,children:e})},um=({children:t,className:e,horizontal:n,theme:r={},...s})=>{const o=re(pe().timeline,r);return f.jsx(rm.Provider,{value:{theme:o,horizontal:n},children:f.jsx("ol",{"data-testid":"timeline-component",className:Q(n&&o.root.direction.horizontal,!n&&o.root.direction.vertical,e),...s,children:t})})};um.displayName="Timeline",im.displayName="Timeline.Item",lm.displayName="Timeline.Point",am.displayName="Timeline.Content",cm.displayName="Timeline.Time",dm.displayName="Timeline.Title",nm.displayName="Timeline.Body",Object.assign(um,{Item:im,Point:lm,Content:am,Time:cm,Title:dm,Body:nm});const fm=_.createContext(void 0);function l_(){const t=_.useContext(fm);if(!t)throw new Error("useToastContext should be used within the ToastContext provider!");return t}const hm=({className:t,onClick:e,theme:n={},xIcon:r=t1,onDismiss:s,...o})=>{const{theme:a,duration:i,isClosed:l,isRemoved:c,setIsClosed:d,setIsRemoved:u}=l_(),g=re(a.toggle,n),h=m=>{if(e&&e(m),s){s();return}d(!l),setTimeout(()=>u(!c),i)};return f.jsx("button",{"aria-label":"Close",onClick:h,type:"button",className:Q(g.base,t),...o,children:f.jsx(r,{"aria-hidden":!0,className:g.icon})})},c_={75:"duration-75",100:"duration-100",150:"duration-150",200:"duration-200",300:"duration-300",500:"duration-500",700:"duration-700",1e3:"duration-1000"},gm=({children:t,className:e,duration:n=300,theme:r={},...s})=>{const[o,a]=_.useState(!1),[i,l]=_.useState(!1),c=re(pe().toast,r);return i?null:f.jsx(fm.Provider,{value:{theme:c,duration:n,isClosed:o,isRemoved:i,setIsClosed:a,setIsRemoved:l},children:f.jsx("div",{"data-testid":"flowbite-toast",role:"alert",className:Q(c.root.base,c_[n],o&&c.root.closed,e),...s,children:t})})};gm.displayName="Toast",hm.displayName="Toast.Toggle",Object.assign(gm,{Toggle:hm});const d_=_.forwardRef(({checked:t,className:e,color:n="blue",sizing:r="md",disabled:s,label:o,name:a,onChange:i,theme:l={},...c},d)=>{const u=_.useId(),g=re(pe().toggleSwitch,l),h=()=>i(!t),m=()=>{h()},p=b=>{b.code=="Enter"&&b.preventDefault()};return f.jsxs(f.Fragment,{children:[a&&t?f.jsx("input",{ref:d,checked:t,hidden:!0,name:a,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(g.root.base,g.root.active[s?"off":"on"],e),...c,children:[f.jsx("div",{"data-testid":"flowbite-toggleswitch-toggle",className:Q(g.toggle.base,g.toggle.checked[t?"on":"off"],t&&g.toggle.checked.color[n],g.toggle.sizes[r])}),o!=null&&o.length?f.jsx("span",{"data-testid":"flowbite-toggleswitch-label",id:`${u}-flowbite-toggleswitch-label`,className:g.root.label,children:o}):null]})]})});d_.displayName="ToggleSwitch";const Is=_.forwardRef(({icon:t,placeholder:e,label:n,error:r,type:s,classInclude:o,maxLength:a,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(xs,{className:`${o}`,sizing:"sm",maxLength:a,ref:d,type:s,rightIcon:()=>f.jsx(sh,{size:17,"aria-label":"search"}),placeholder:e,onChange:i,id:"search-input",...c}):f.jsx(xs,{className:`${o}`,sizing:"sm",maxLength:a,ref:d,type:s,placeholder:e,onChange:i,id:"input",...c}),r&&f.jsx("p",{className:"mt-1 text-xs text-red-500",children:r})]}));Is.displayName="InputForm";const u_={"mth-password":"passwordInput-module__mth-password__R6DoN"},pd=({placeholder:t,onChange:e,value:n,...r})=>{const[s,o]=_.useState(!1),a=()=>{o(!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:a,className:u_["mth-password"],children:s?f.jsx(Z3,{}):f.jsx(Q3,{})})]})})},mm={mth_progress_bar:"progressBar-module__mth_progress_bar__q2V2y",mth_progress_bar_thumb:"progressBar-module__mth_progress_bar_thumb__OTDNJ"},pm=({start:t,end:e,current:n,type:r})=>{const s=(n-t)/(e-t)*100,o=Math.min(Math.max(s,0),100),a=()=>o<10?"left-0":o>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:`${o}%`}}),f.jsxs("div",{className:"absolute top-1/2 transform -translate-y-1/2 -translate-x-1/2",style:{left:`${o}%`},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 ${a()}`,children:[n.toLocaleString()," ",r==="percentage"?"%":""]})]})]})]})},bm=_.forwardRef(({options:t,label:e,error:n,value:r,onChange:s,id:o,classDiv:a,...i},l)=>f.jsxs("div",{className:a,children:[f.jsxs("select",{ref:l,id:o,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})]}));bm.displayName="SelectForm";const ym={mth_card_indicator:"card-module__mth_card_indicator__lfgp3"},f_=({logo:t,number:e,title:n,start:r,end:s,current:o,type:a,classIm:i})=>{const l=c=>new Intl.NumberFormat("es-ES",{maximumFractionDigits:2,minimumFractionDigits:0}).format(c);return f.jsxs("div",{className:`${ym.mth_card_indicator} flex flex-col border bg-white p-5`,children:[f.jsx("div",{className:"flex justify-end",children:f.jsx(Ir,{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)," ",a==="percentage"?"%":""]}),f.jsx("div",{className:"mt-2 mth_card_indicator_progress_bar",children:f.jsx(pm,{start:r,end:s,current:o,type:a})})]})};/*!
8
+ */var F5=["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])"],oi=F5.join(","),y0=typeof Element>"u",Ds=y0?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ai=!y0&&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},ii=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"),o=s===""||s==="true",a=o||n&&e&&t(e.parentNode);return a},B5=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},W5=function(e,n,r){if(ii(e))return[];var s=Array.prototype.slice.apply(e.querySelectorAll(oi));return n&&Ds.call(e,oi)&&s.unshift(e),s=s.filter(r),s},z5=function t(e,n,r){for(var s=[],o=Array.from(e);o.length;){var a=o.shift();if(!ii(a,!1))if(a.tagName==="SLOT"){var i=a.assignedElements(),l=i.length?i:a.children,c=t(l,!0,r);r.flatten?s.push.apply(s,c):s.push({scopeParent:a,candidates:c})}else{var d=Ds.call(a,oi);d&&r.filter(a)&&(n||!e.includes(a))&&s.push(a);var u=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),g=!ii(u,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(u&&g){var h=t(u===!0?a.children:u.children,!0,r);r.flatten?s.push.apply(s,h):s.push({scopeParent:a,candidates:h})}else o.unshift.apply(o,a.children)}}return s},w0=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},v0=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||B5(e))&&!w0(e)?0:e.tabIndex},H5=function(e,n){var r=v0(e);return r<0&&n&&!w0(e)?0:r},V5=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},x0=function(e){return e.tagName==="INPUT"},Y5=function(e){return x0(e)&&e.type==="hidden"},U5=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},G5=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},X5=function(e){if(!e.name)return!0;var n=e.form||ai(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(a){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",a.message),!1}var o=G5(s,e.form);return!o||o===e},K5=function(e){return x0(e)&&e.type==="radio"},Z5=function(e){return K5(e)&&!X5(e)},Q5=function(e){var n,r=e&&ai(e),s=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==e){var a,i,l;for(o=!!((a=s)!==null&&a!==void 0&&(i=a.ownerDocument)!==null&&i!==void 0&&i.contains(s)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!o&&s;){var c,d,u;r=ai(s),s=(c=r)===null||c===void 0?void 0:c.host,o=!!((d=s)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(s))}}return o},k0=function(e){var n=e.getBoundingClientRect(),r=n.width,s=n.height;return r===0&&s===0},J5=function(e,n){var r=n.displayCheck,s=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var o=Ds.call(e,"details>summary:first-of-type"),a=o?e.parentElement:e;if(Ds.call(a,"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=ai(e);if(l&&!l.shadowRoot&&s(l)===!0)return k0(e);e.assignedSlot?e=e.assignedSlot:!l&&c!==e.ownerDocument?e=c.host:e=l}e=i}if(Q5(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return k0(e);return!1},q5=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 Ds.call(n,"fieldset[disabled] *")?!0:!s.contains(e)}return!0}n=n.parentElement}return!1},$5=function(e,n){return!(n.disabled||ii(n)||Y5(n)||J5(n,e)||U5(n)||q5(n))},Xc=function(e,n){return!(Z5(n)||v0(n)<0||!$5(e,n))},e3=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},t3=function t(e){var n=[],r=[];return e.forEach(function(s,o){var a=!!s.scopeParent,i=a?s.scopeParent:s,l=H5(i,a),c=a?t(s.candidates):i;l===0?a?n.push.apply(n,c):n.push(i):r.push({documentOrder:o,tabIndex:l,item:s,isScope:a,content:c})}),r.sort(V5).reduce(function(s,o){return o.isScope?s.push.apply(s,o.content):s.push(o.content),s},[]).concat(n)},li=function(e,n){n=n||{};var r;return n.getShadowRoot?r=z5([e],n.includeContainer,{filter:Xc.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:e3}):r=W5(e,n.includeContainer,Xc.bind(null,n)),t3(r)},n3=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Ds.call(e,oi)===!1?!1:Xc(n,e)};function _0(t){return Y.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})},t)}const r3=Y.useInsertionEffect||(t=>t());function kn(t){const e=Y.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return r3(()=>{e.current=t}),Y.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 Kc="ArrowUp",Eo="ArrowDown",Es="ArrowLeft",Ts="ArrowRight";function ci(t,e,n){return Math.floor(t/e)!==n}function To(t,e){return e<0||e>=t.current.length}function Zc(t,e){return kt(t,{disabledIndices:e})}function C0(t,e){return kt(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function kt(t,e){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:s,amount:o=1}=e===void 0?{}:e;const a=t.current,i=s?c=>s.includes(c):c=>{const d=a[c];return d==null||d.hasAttribute("disabled")||d.getAttribute("aria-disabled")==="true"};let l=n;do l+=r?-o:o;while(l>=0&&l<=a.length-1&&i(l));return l}function s3(t,e){let{event:n,orientation:r,loop:s,cols:o,disabledIndices:a,minIndex:i,maxIndex:l,prevIndex:c,stopEvent:d=!1}=e,u=c;if(n.key===Kc){if(d&&yt(n),c===-1)u=l;else if(u=kt(t,{startingIndex:u,amount:o,decrement:!0,disabledIndices:a}),s&&(c-o<i||u<0)){const g=c%o,h=l%o,m=l-(h-g);h===g?u=l:u=h>g?m:m-o}To(t,u)&&(u=c)}if(n.key===Eo&&(d&&yt(n),c===-1?u=i:(u=kt(t,{startingIndex:c,amount:o,disabledIndices:a}),s&&c+o>l&&(u=kt(t,{startingIndex:c%o-o,amount:o,disabledIndices:a}))),To(t,u)&&(u=c)),r==="both"){const g=Ss(c/o);n.key===Ts&&(d&&yt(n),c%o!==o-1?(u=kt(t,{startingIndex:c,disabledIndices:a}),s&&ci(u,o,g)&&(u=kt(t,{startingIndex:c-c%o-1,disabledIndices:a}))):s&&(u=kt(t,{startingIndex:c-c%o-1,disabledIndices:a})),ci(u,o,g)&&(u=c)),n.key===Es&&(d&&yt(n),c%o!==0?(u=kt(t,{startingIndex:c,disabledIndices:a,decrement:!0}),s&&ci(u,o,g)&&(u=kt(t,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a}))):s&&(u=kt(t,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a})),ci(u,o,g)&&(u=c));const h=Ss(l/o)===g;To(t,u)&&(s&&h?u=n.key===Es?l:kt(t,{startingIndex:c-c%o-1,disabledIndices:a}):u=c)}return u}function o3(t,e,n){const r=[];let s=0;return t.forEach((o,a)=>{let{width:i,height:l}=o;if(i>e&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+a+" is greater than grid columns");let c=!1;for(n&&(s=0);!c;){const d=[];for(let u=0;u<i;u++)for(let g=0;g<l;g++)d.push(s+u+g*e);s%e+i<=e&&d.every(u=>r[u]==null)?(d.forEach(u=>{r[u]=a}),c=!0):s++}}),[...r]}function a3(t,e,n,r,s){if(t===-1)return-1;const o=n.indexOf(t);switch(s){case"tl":return o;case"tr":return o+e[t].width-1;case"bl":return o+(e[t].height-1)*r;case"br":return n.lastIndexOf(t)}}function i3(t,e){return e.flatMap((n,r)=>t.includes(n)?[r]:[])}let S0=0;function Un(t,e){e===void 0&&(e={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:s=!1}=e;r&&cancelAnimationFrame(S0);const o=()=>t==null?void 0:t.focus({preventScroll:n});s?o():S0=requestAnimationFrame(o)}var Be=typeof document<"u"?_.useLayoutEffect:_.useEffect;function l3(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 c3(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 M0=Y.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function d3(t){let{children:e,elementsRef:n,labelsRef:r}=t;const[s,o]=Y.useState(()=>new Map),a=Y.useCallback(l=>{o(c=>new Map(c).set(l,null))},[]),i=Y.useCallback(l=>{o(c=>{const d=new Map(c);return d.delete(l),d})},[]);return Be(()=>{const l=new Map(s);Array.from(l.keys()).sort(l3).forEach((d,u)=>{l.set(d,u)}),c3(s,l)||o(l)},[s]),Y.createElement(M0.Provider,{value:Y.useMemo(()=>({register:a,unregister:i,map:s,elementsRef:n,labelsRef:r}),[a,i,s,n,r])},e)}function u3(t){let{label:e}=t===void 0?{}:t;const[n,r]=Y.useState(null),s=Y.useRef(null),{register:o,unregister:a,map:i,elementsRef:l,labelsRef:c}=Y.useContext(M0),d=Y.useCallback(u=>{if(s.current=u,n!==null&&(l.current[n]=u,c)){var g;const h=e!==void 0;c.current[n]=h?e:(g=u==null?void 0:u.textContent)!=null?g:null}},[n,l,c,e]);return Be(()=>{const u=s.current;if(u)return o(u),()=>{a(u)}},[o,a]),Be(()=>{const u=s.current?i.get(s.current):null;u!=null&&r(u)},[i]),Y.useMemo(()=>({ref:d,index:n??-1}),[n,d])}function Po(){return Po=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},Po.apply(this,arguments)}let Qc=!1,f3=0;const O0=()=>"floating-ui-"+f3++;function h3(){const[t,e]=Y.useState(()=>Qc?O0():void 0);return Be(()=>{t==null&&e(O0())},[]),Y.useEffect(()=>{Qc||(Qc=!0)},[]),t}const di=Y.useId||h3;function g3(){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 m3=Y.createContext(null),p3=Y.createContext(null),ui=()=>{var t;return((t=Y.useContext(m3))==null?void 0:t.id)||null},No=()=>Y.useContext(p3);function Wr(t){return"data-floating-ui-"+t}function _n(t){const e=_.useRef(t);return Be(()=>{e.current=t}),e}const D0=Wr("safe-polygon");function Jc(t,e,n){return n&&!Ja(n)?0:typeof t=="number"?t:t==null?void 0:t[e]}function b3(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:s,events:o,elements:{domReference:a,floating:i},refs:l}=t,{enabled:c=!0,delay:d=0,handleClose:u=null,mouseOnly:g=!1,restMs:h=0,move:m=!0}=e,p=No(),b=ui(),y=_n(u),x=_n(d),k=Y.useRef(),v=Y.useRef(),w=Y.useRef(),C=Y.useRef(),N=Y.useRef(!0),T=Y.useRef(!1),I=Y.useRef(()=>{}),D=Y.useCallback(()=>{var M;const E=(M=s.current.openEvent)==null?void 0:M.type;return(E==null?void 0:E.includes("mouse"))&&E!=="mousedown"},[s]);Y.useEffect(()=>{if(!c)return;function M(E){let{open:S}=E;S||(clearTimeout(v.current),clearTimeout(C.current),N.current=!0)}return o.on("openchange",M),()=>{o.off("openchange",M)}},[c,o]),Y.useEffect(()=>{if(!c||!y.current||!n)return;function M(S){D()&&r(!1,S,"hover")}const E=Ot(i).documentElement;return E.addEventListener("mouseleave",M),()=>{E.removeEventListener("mouseleave",M)}},[i,n,r,c,y,D]);const z=Y.useCallback(function(M,E,S){E===void 0&&(E=!0),S===void 0&&(S="hover");const B=Jc(x.current,"close",k.current);B&&!w.current?(clearTimeout(v.current),v.current=setTimeout(()=>r(!1,M,S),B)):E&&(clearTimeout(v.current),r(!1,M,S))},[x,r]),L=Y.useCallback(()=>{I.current(),w.current=void 0},[]),P=Y.useCallback(()=>{if(T.current){const M=Ot(l.floating.current).body;M.style.pointerEvents="",M.removeAttribute(D0),T.current=!1}},[l]);return Y.useEffect(()=>{if(!c)return;function M(){return s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1}function E(W){if(clearTimeout(v.current),N.current=!1,g&&!Ja(k.current)||h>0&&Jc(x.current,"open")===0)return;const X=Jc(x.current,"open",k.current);X?v.current=setTimeout(()=>{r(!0,W,"hover")},X):r(!0,W,"hover")}function S(W){if(M())return;I.current();const X=Ot(i);if(clearTimeout(C.current),y.current){n||clearTimeout(v.current),w.current=y.current({...t,tree:p,x:W.clientX,y:W.clientY,onClose(){P(),L(),z(W,!0,"safe-polygon")}});const V=w.current;X.addEventListener("mousemove",V),I.current=()=>{X.removeEventListener("mousemove",V)};return}(k.current==="touch"?!st(i,W.relatedTarget):!0)&&z(W)}function B(W){M()||y.current==null||y.current({...t,tree:p,x:W.clientX,y:W.clientY,onClose(){P(),L(),z(W)}})(W)}if(Ae(a)){const W=a;return n&&W.addEventListener("mouseleave",B),i==null||i.addEventListener("mouseleave",B),m&&W.addEventListener("mousemove",E,{once:!0}),W.addEventListener("mouseenter",E),W.addEventListener("mouseleave",S),()=>{n&&W.removeEventListener("mouseleave",B),i==null||i.removeEventListener("mouseleave",B),m&&W.removeEventListener("mousemove",E),W.removeEventListener("mouseenter",E),W.removeEventListener("mouseleave",S)}}},[a,i,c,t,g,h,m,z,L,P,r,n,p,x,y,s]),Be(()=>{var M;if(c&&n&&(M=y.current)!=null&&M.__options.blockPointerEvents&&D()){const S=Ot(i).body;if(S.setAttribute(D0,""),S.style.pointerEvents="none",T.current=!0,Ae(a)&&i){var E;const B=a,W=p==null||(E=p.nodesRef.current.find(X=>X.id===b))==null||(E=E.context)==null?void 0:E.elements.floating;return W&&(W.style.pointerEvents=""),B.style.pointerEvents="auto",i.style.pointerEvents="auto",()=>{B.style.pointerEvents="",i.style.pointerEvents=""}}}},[c,n,b,i,a,p,y,D]),Be(()=>{n||(k.current=void 0,L(),P())},[n,L,P]),Y.useEffect(()=>()=>{L(),clearTimeout(v.current),clearTimeout(C.current),P()},[c,a,L,P]),Y.useMemo(()=>{if(!c)return{};function M(E){k.current=E.pointerType}return{reference:{onPointerDown:M,onPointerEnter:M,onMouseMove(E){n||h===0||(clearTimeout(C.current),C.current=setTimeout(()=>{N.current||r(!0,E.nativeEvent,"hover")},h))}},floating:{onMouseEnter(){clearTimeout(v.current)},onMouseLeave(E){z(E.nativeEvent,!1)}}}},[c,h,n,r,z])}function y3(t,e){var n;let r=[],s=(n=t.find(o=>o.id===e))==null?void 0:n.parentId;for(;s;){const o=t.find(a=>a.id===s);s=o==null?void 0:o.parentId,o&&(r=r.concat(o))}return r}function zr(t,e){let n=t.filter(s=>{var o;return s.parentId===e&&((o=s.context)==null?void 0:o.open)}),r=n;for(;r.length;)r=t.filter(s=>{var o;return(o=r)==null?void 0:o.some(a=>{var i;return s.parentId===a.id&&((i=s.context)==null?void 0:i.open)})}),n=n.concat(r);return n}function w3(t,e){let n,r=-1;function s(o,a){a>r&&(n=o,r=a),zr(t,o).forEach(l=>{s(l.id,a+1)})}return s(e,0),t.find(o=>o.id===n)}let Ps=new WeakMap,fi=new WeakSet,hi={},qc=0;const v3=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,E0=t=>t&&(t.host||E0(t.parentNode)),x3=(t,e)=>e.map(n=>{if(t.contains(n))return n;const r=E0(n);return t.contains(r)?r:null}).filter(n=>n!=null);function k3(t,e,n,r){const s="data-floating-ui-inert",o=r?"inert":n?"aria-hidden":null,a=x3(e,t),i=new Set,l=new Set(a),c=[];hi[s]||(hi[s]=new WeakMap);const d=hi[s];a.forEach(u),g(e),i.clear();function u(h){!h||i.has(h)||(i.add(h),h.parentNode&&u(h.parentNode))}function g(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,m=>{if(i.has(m))g(m);else{const p=o?m.getAttribute(o):null,b=p!==null&&p!=="false",y=(Ps.get(m)||0)+1,x=(d.get(m)||0)+1;Ps.set(m,y),d.set(m,x),c.push(m),y===1&&b&&fi.add(m),x===1&&m.setAttribute(s,""),!b&&o&&m.setAttribute(o,"true")}})}return qc++,()=>{c.forEach(h=>{const m=(Ps.get(h)||0)-1,p=(d.get(h)||0)-1;Ps.set(h,m),d.set(h,p),m||(!fi.has(h)&&o&&h.removeAttribute(o),fi.delete(h)),p||h.removeAttribute(s)}),qc--,qc||(Ps=new WeakMap,Ps=new WeakMap,fi=new WeakSet,hi={})}}function T0(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=Ot(t[0]).body;return k3(t.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,e,n)}const jo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function P0(t,e){const n=li(t,jo());e==="prev"&&n.reverse();const r=n.indexOf(wn(Ot(t)));return n.slice(r+1)[0]}function N0(){return P0(document.body,"next")}function j0(){return P0(document.body,"prev")}function Io(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!st(n,r)}function _3(t){li(t,jo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function C3(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 $c={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 S3;function I0(t){t.key==="Tab"&&(t.target,clearTimeout(S3))}const gi=Y.forwardRef(function(e,n){const[r,s]=Y.useState();Be(()=>(Ac()&&s("button"),document.addEventListener("keydown",I0),()=>{document.removeEventListener("keydown",I0)}),[]);const o={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Wr("focus-guard")]:"",style:$c};return Y.createElement("span",Po({},e,o))}),A0=Y.createContext(null),L0=Wr("portal");function M3(t){let{id:e,root:n}=t===void 0?{}:t;const[r,s]=Y.useState(null),o=di(),a=R0(),i=Y.useRef(null);return Be(()=>()=>{r==null||r.remove(),queueMicrotask(()=>{i.current=null})},[r]),Be(()=>{if(i.current)return;const l=e?document.getElementById(e):null;if(!l)return;const c=document.createElement("div");c.id=o,c.setAttribute(L0,""),l.appendChild(c),i.current=c,s(c)},[e,o]),Be(()=>{if(i.current)return;let l=n||(a==null?void 0:a.portalNode);l&&!Ae(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=o,d.setAttribute(L0,""),l=c||l,l.appendChild(d),i.current=d,s(d)},[e,n,o,a]),r}function O3(t){let{children:e,id:n,root:r=null,preserveTabOrder:s=!0}=t;const o=M3({id:n,root:r}),[a,i]=Y.useState(null),l=Y.useRef(null),c=Y.useRef(null),d=Y.useRef(null),u=Y.useRef(null),g=!!a&&!a.modal&&a.open&&s&&!!(r||o);return Y.useEffect(()=>{if(!o||!s||a!=null&&a.modal)return;function h(m){o&&Io(m)&&(m.type==="focusin"?C3:_3)(o)}return o.addEventListener("focusin",h,!0),o.addEventListener("focusout",h,!0),()=>{o.removeEventListener("focusin",h,!0),o.removeEventListener("focusout",h,!0)}},[o,s,a==null?void 0:a.modal]),Y.createElement(A0.Provider,{value:Y.useMemo(()=>({preserveTabOrder:s,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:u,portalNode:o,setFocusManagerState:i}),[s,o])},g&&o&&Y.createElement(gi,{"data-type":"outside",ref:l,onFocus:h=>{if(Io(h,o)){var m;(m=d.current)==null||m.focus()}else{const p=j0()||(a==null?void 0:a.refs.domReference.current);p==null||p.focus()}}}),g&&o&&Y.createElement("span",{"aria-owns":o.id,style:$c}),o&&nh.createPortal(e,o),g&&o&&Y.createElement(gi,{"data-type":"outside",ref:c,onFocus:h=>{if(Io(h,o)){var m;(m=u.current)==null||m.focus()}else{const p=N0()||(a==null?void 0:a.refs.domReference.current);p==null||p.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,h.nativeEvent))}}}))}const R0=()=>Y.useContext(A0),D3=20;let Hr=[];function ed(t){Hr=Hr.filter(n=>n.isConnected);let e=t;if(!(!e||Rr(e)==="body")){if(!n3(e,jo())){const n=li(e,jo())[0];if(!n)return;e=n}Hr.push(e),Hr.length>D3&&(Hr=Hr.slice(-20))}}function F0(){return Hr.slice().reverse().find(t=>t.isConnected)}const E3=Y.forwardRef(function(e,n){return Y.createElement("button",Po({},e,{type:"button",ref:n,tabIndex:-1,style:$c}))});function B0(t){const{context:e,children:n,disabled:r=!1,order:s=["content"],guards:o=!0,initialFocus:a=0,returnFocus:i=!0,modal:l=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:d=!0}=t,{open:u,refs:g,nodeId:h,onOpenChange:m,events:p,dataRef:b,elements:{domReference:y,floating:x}}=e,k=typeof a=="number"&&a<0,v=$h(y)&&k,w=v3()?o:!0,C=_n(s),N=_n(a),T=_n(i),I=No(),D=R0(),z=Y.useRef(null),L=Y.useRef(null),P=Y.useRef(!1),M=Y.useRef(!1),E=D!=null,S=Y.useCallback(function(j){return j===void 0&&(j=x),j?li(j,jo()):[]},[x]),B=Y.useCallback(j=>{const V=S(j);return C.current.map(A=>y&&A==="reference"?y:x&&A==="floating"?x:V).filter(Boolean).flat()},[y,x,C,S]);Y.useEffect(()=>{if(r||!l)return;function j(A){if(A.key==="Tab"){st(x,wn(Ot(x)))&&S().length===0&&!v&&yt(A);const R=B(),F=gr(A);C.current[0]==="reference"&&F===y&&(yt(A),A.shiftKey?Un(R[R.length-1]):Un(R[1])),C.current[1]==="floating"&&F===x&&A.shiftKey&&(yt(A),Un(R[0]))}}const V=Ot(x);return V.addEventListener("keydown",j),()=>{V.removeEventListener("keydown",j)}},[r,y,x,l,C,v,S,B]),Y.useEffect(()=>{if(r||!d)return;function j(){M.current=!0,setTimeout(()=>{M.current=!1})}function V(A){const R=A.relatedTarget;queueMicrotask(()=>{const F=!(st(y,R)||st(x,R)||st(R,x)||st(D==null?void 0:D.portalNode,R)||R!=null&&R.hasAttribute(Wr("focus-guard"))||I&&(zr(I.nodesRef.current,h).find(O=>{var H,q;return st((H=O.context)==null?void 0:H.elements.floating,R)||st((q=O.context)==null?void 0:q.elements.domReference,R)})||y3(I.nodesRef.current,h).find(O=>{var H,q;return((H=O.context)==null?void 0:H.elements.floating)===R||((q=O.context)==null?void 0:q.elements.domReference)===R})));R&&F&&!M.current&&R!==F0()&&(P.current=!0,m(!1,A))})}if(x&&bt(y))return y.addEventListener("focusout",V),y.addEventListener("pointerdown",j),!l&&x.addEventListener("focusout",V),()=>{y.removeEventListener("focusout",V),y.removeEventListener("pointerdown",j),!l&&x.removeEventListener("focusout",V)}},[r,y,x,l,h,I,D,m,d]),Y.useEffect(()=>{var j;if(r)return;const V=Array.from((D==null||(j=D.portalNode)==null?void 0:j.querySelectorAll("["+Wr("portal")+"]"))||[]);if(x){const A=[x,...V,z.current,L.current,C.current.includes("reference")||v?y:null].filter(F=>F!=null),R=l||v?T0(A,w,!w):T0(A);return()=>{R()}}},[r,y,x,l,C,D,v,w]),Be(()=>{if(r||!x)return;const j=Ot(x),V=wn(j);queueMicrotask(()=>{const A=B(x),R=N.current,F=(typeof R=="number"?A[R]:R.current)||x,O=st(x,V);!k&&!O&&u&&Un(F,{preventScroll:F===x})})},[r,u,x,k,B,N]),Be(()=>{if(r||!x)return;let j=!1;const V=Ot(x),A=wn(V),R=b.current;ed(A);function F(O){let{reason:H,event:q,nested:Z}=O;H==="escape-key"&&g.domReference.current&&ed(g.domReference.current),H==="hover"&&q.type==="mouseleave"&&(P.current=!0),H==="outside-press"&&(Z?(P.current=!1,j=!0):P.current=!(Jh(q)||Ic(q)))}return p.on("openchange",F),()=>{p.off("openchange",F);const O=wn(V),H=st(x,O)||I&&zr(I.nodesRef.current,h).some($=>{var te;return st((te=$.context)==null?void 0:te.elements.floating,O)});(H||R.openEvent&&["click","mousedown"].includes(R.openEvent.type))&&g.domReference.current&&ed(g.domReference.current);const Z=F0();T.current&&!P.current&&bt(Z)&&(!(Z!==O&&O!==V.body)||H)&&Un(Z,{cancelPrevious:!1,preventScroll:j})}},[r,x,T,b,g,p,I,h]),Be(()=>{if(!(r||!D))return D.setFocusManagerState({modal:l,closeOnFocusOut:d,open:u,onOpenChange:m,refs:g}),()=>{D.setFocusManagerState(null)}},[r,D,l,u,m,g,d]),Be(()=>{if(r||!x||typeof MutationObserver!="function"||k)return;const j=()=>{const A=x.getAttribute("tabindex");C.current.includes("floating")||wn(Ot(x))!==g.domReference.current&&S().length===0?A!=="0"&&x.setAttribute("tabindex","0"):A!=="-1"&&x.setAttribute("tabindex","-1")};j();const V=new MutationObserver(j);return V.observe(x,{childList:!0,subtree:!0,attributes:!0}),()=>{V.disconnect()}},[r,x,g,C,S,k]);function W(j){return r||!c||!l?null:Y.createElement(E3,{ref:j==="start"?z:L,onClick:V=>m(!1,V.nativeEvent)},typeof c=="string"?c:"Dismiss")}const X=!r&&w&&(E||l);return Y.createElement(Y.Fragment,null,X&&Y.createElement(gi,{"data-type":"inside",ref:D==null?void 0:D.beforeInsideRef,onFocus:j=>{if(l){const A=B();Un(s[0]==="reference"?A[0]:A[A.length-1])}else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(P.current=!1,Io(j,D.portalNode)){const A=N0()||y;A==null||A.focus()}else{var V;(V=D.beforeOutsideRef.current)==null||V.focus()}}}),!v&&W("start"),n,W("end"),X&&Y.createElement(gi,{"data-type":"inside",ref:D==null?void 0:D.afterInsideRef,onFocus:j=>{if(l)Un(B()[0]);else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(d&&(P.current=!0),Io(j,D.portalNode)){const A=j0()||y;A==null||A.focus()}else{var V;(V=D.afterOutsideRef.current)==null||V.focus()}}}))}const td=new Set,T3=Y.forwardRef(function(e,n){let{lockScroll:r=!1,...s}=e;const o=di();return Be(()=>{if(!r)return;td.add(o);const a=/iP(hone|ad|od)|iOS/.test(jc()),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,g=i.top?parseFloat(i.top):window.pageYOffset;if(i.overflow="hidden",d&&(i[c]=d+"px"),a){var h,m;const p=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,b=((m=window.visualViewport)==null?void 0:m.offsetTop)||0;Object.assign(i,{position:"fixed",top:-(g-Math.floor(b))+"px",left:-(u-Math.floor(p))+"px",right:"0"})}return()=>{td.delete(o),td.size===0&&(Object.assign(i,{overflow:"",[c]:""}),a&&(Object.assign(i,{position:"",top:"",left:"",right:""}),window.scrollTo(u,g)))}},[o,r]),Y.createElement("div",Po({ref:n},s,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...s.style}}))});function W0(t){return bt(t.target)&&t.target.tagName==="BUTTON"}function z0(t){return Fc(t)}function H0(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:s,elements:{domReference:o}}=t,{enabled:a=!0,event:i="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:d=!0}=e,u=Y.useRef(),g=Y.useRef(!1);return Y.useMemo(()=>a?{reference:{onPointerDown(h){u.current=h.pointerType},onMouseDown(h){h.button===0&&(Ja(u.current,!0)&&c||i!=="click"&&(n&&l&&(!s.current.openEvent||s.current.openEvent.type==="mousedown")?r(!1,h.nativeEvent,"click"):(h.preventDefault(),r(!0,h.nativeEvent,"click"))))},onClick(h){if(i==="mousedown"&&u.current){u.current=void 0;return}Ja(u.current,!0)&&c||(n&&l&&(!s.current.openEvent||s.current.openEvent.type==="click")?r(!1,h.nativeEvent,"click"):r(!0,h.nativeEvent,"click"))},onKeyDown(h){u.current=void 0,!(h.defaultPrevented||!d||W0(h))&&(h.key===" "&&!z0(o)&&(h.preventDefault(),g.current=!0),h.key==="Enter"&&r(!(n&&l),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!d||W0(h)||z0(o)||h.key===" "&&g.current&&(g.current=!1,r(!(n&&l),h.nativeEvent,"click"))}}}:{},[a,s,i,c,d,o,l,n,r])}const P3={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},N3={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},V0=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 Y0(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,nodeId:s,elements:{reference:o,domReference:a,floating:i},dataRef:l}=t,{enabled:c=!0,escapeKey:d=!0,outsidePress:u=!0,outsidePressEvent:g="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:p=!1,bubbles:b,capture:y}=e,x=No(),k=kn(typeof u=="function"?u:()=>!1),v=typeof u=="function"?k:u,w=Y.useRef(!1),C=Y.useRef(!1),{escapeKey:N,outsidePress:T}=V0(b),{escapeKey:I,outsidePress:D}=V0(y),z=kn(E=>{if(!n||!c||!d||E.key!=="Escape")return;const S=x?zr(x.nodesRef.current,s):[];if(!N&&(E.stopPropagation(),S.length>0)){let B=!0;if(S.forEach(W=>{var X;if((X=W.context)!=null&&X.open&&!W.context.dataRef.current.__escapeKeyBubbles){B=!1;return}}),!B)return}r(!1,Xk(E)?E.nativeEvent:E,"escape-key")}),L=kn(E=>{var S;const B=()=>{var W;z(E),(W=gr(E))==null||W.removeEventListener("keydown",B)};(S=gr(E))==null||S.addEventListener("keydown",B)}),P=kn(E=>{const S=w.current;w.current=!1;const B=C.current;if(C.current=!1,g==="click"&&B||S||typeof v=="function"&&!v(E))return;const W=gr(E),X="["+Wr("inert")+"]",j=Ot(i).querySelectorAll(X);let V=Ae(W)?W:null;for(;V&&!fr(V);){const F=Vn(V);if(fr(F)||!Ae(F))break;V=F}if(j.length&&Ae(W)&&!Kk(W)&&!st(W,i)&&Array.from(j).every(F=>!st(V,F)))return;if(bt(W)&&i){const F=W.clientWidth>0&&W.scrollWidth>W.clientWidth,O=W.clientHeight>0&&W.scrollHeight>W.clientHeight;let H=O&&E.offsetX>W.clientWidth;if(O&&tn(W).direction==="rtl"&&(H=E.offsetX<=W.offsetWidth-W.clientWidth),H||F&&E.offsetY>W.clientHeight)return}const A=x&&zr(x.nodesRef.current,s).some(F=>{var O;return Rc(E,(O=F.context)==null?void 0:O.elements.floating)});if(Rc(E,i)||Rc(E,a)||A)return;const R=x?zr(x.nodesRef.current,s):[];if(R.length>0){let F=!0;if(R.forEach(O=>{var H;if((H=O.context)!=null&&H.open&&!O.context.dataRef.current.__outsidePressBubbles){F=!1;return}}),!F)return}r(!1,E,"outside-press")}),M=kn(E=>{var S;const B=()=>{var W;P(E),(W=gr(E))==null||W.removeEventListener(g,B)};(S=gr(E))==null||S.addEventListener(g,B)});return Y.useEffect(()=>{if(!n||!c)return;l.current.__escapeKeyBubbles=N,l.current.__outsidePressBubbles=T;function E(W){r(!1,W,"ancestor-scroll")}const S=Ot(i);d&&S.addEventListener("keydown",I?L:z,I),v&&S.addEventListener(g,D?M:P,D);let B=[];return p&&(Ae(a)&&(B=hr(a)),Ae(i)&&(B=B.concat(hr(i))),!Ae(o)&&o&&o.contextElement&&(B=B.concat(hr(o.contextElement)))),B=B.filter(W=>{var X;return W!==((X=S.defaultView)==null?void 0:X.visualViewport)}),B.forEach(W=>{W.addEventListener("scroll",E,{passive:!0})}),()=>{d&&S.removeEventListener("keydown",I?L:z,I),v&&S.removeEventListener(g,D?M:P,D),B.forEach(W=>{W.removeEventListener("scroll",E)})}},[l,i,a,o,d,v,g,n,r,p,c,N,T,z,I,L,P,D,M]),Y.useEffect(()=>{w.current=!1},[v,g]),Y.useMemo(()=>c?{reference:{onKeyDown:z,[P3[m]]:E=>{h&&r(!1,E.nativeEvent,"reference-press")}},floating:{onKeyDown:z,onMouseDown(){C.current=!0},onMouseUp(){C.current=!0},[N3[g]]:()=>{w.current=!0}}}:{},[c,h,g,m,r,z])}let nd;process.env.NODE_ENV!=="production"&&(nd=new Set);function U0(t){var e;t===void 0&&(t={});const{open:n=!1,onOpenChange:r,nodeId:s}=t;if(process.env.NODE_ENV!=="production"){var o;const T="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((o=t.elements)!=null&&o.reference&&!Ae(t.elements.reference)){var a;if(!((a=nd)!=null&&a.has(T))){var i;(i=nd)==null||i.add(T),console.error(T)}}}const[l,c]=Y.useState(null),d=((e=t.elements)==null?void 0:e.reference)||l,u=P5(t),g=No(),h=ui()!=null,m=kn((T,I,D)=>{T&&(b.current.openEvent=I),y.emit("openchange",{open:T,event:I,reason:D,nested:h}),r==null||r(T,I,D)}),p=Y.useRef(null),b=Y.useRef({}),y=Y.useState(()=>g3())[0],x=di(),k=Y.useCallback(T=>{const I=Ae(T)?{getBoundingClientRect:()=>T.getBoundingClientRect(),contextElement:T}:T;u.refs.setReference(I)},[u.refs]),v=Y.useCallback(T=>{(Ae(T)||T===null)&&(p.current=T,c(T)),(Ae(u.refs.reference.current)||u.refs.reference.current===null||T!==null&&!Ae(T))&&u.refs.setReference(T)},[u.refs]),w=Y.useMemo(()=>({...u.refs,setReference:v,setPositionReference:k,domReference:p}),[u.refs,v,k]),C=Y.useMemo(()=>({...u.elements,domReference:d}),[u.elements,d]),N=Y.useMemo(()=>({...u,refs:w,elements:C,dataRef:b,nodeId:s,floatingId:x,events:y,open:n,onOpenChange:m}),[u,s,x,y,n,m,w,C]);return Be(()=>{const T=g==null?void 0:g.nodesRef.current.find(I=>I.id===s);T&&(T.context=N)}),Y.useMemo(()=>({...u,context:N,refs:w,elements:C}),[u,w,C,N])}function j3(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,events:s,refs:o,elements:{domReference:a}}=t,{enabled:i=!0,visibleOnly:l=!0}=e,c=Y.useRef(!1),d=Y.useRef(),u=Y.useRef(!0);return Y.useEffect(()=>{if(!i)return;const g=Nt(a);function h(){!n&&bt(a)&&a===wn(Ot(a))&&(c.current=!0)}function m(){u.current=!0}return g.addEventListener("blur",h),g.addEventListener("keydown",m,!0),()=>{g.removeEventListener("blur",h),g.removeEventListener("keydown",m,!0)}},[a,n,i]),Y.useEffect(()=>{if(!i)return;function g(h){let{reason:m}=h;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return s.on("openchange",g),()=>{s.off("openchange",g)}},[s,i]),Y.useEffect(()=>()=>{clearTimeout(d.current)},[]),Y.useMemo(()=>i?{reference:{onPointerDown(g){Ic(g.nativeEvent)||(u.current=!1)},onMouseLeave(){c.current=!1},onFocus(g){if(c.current)return;const h=gr(g.nativeEvent);if(l&&Ae(h))try{if(Ac()&&qh())throw Error();if(!h.matches(":focus-visible"))return}catch{if(!u.current&&!Fc(h))return}r(!0,g.nativeEvent,"focus")},onBlur(g){c.current=!1;const h=g.relatedTarget,m=Ae(h)&&h.hasAttribute(Wr("focus-guard"))&&h.getAttribute("data-type")==="outside";d.current=window.setTimeout(()=>{const p=wn(a?a.ownerDocument:document);!h&&p===a||st(o.floating.current,p)||st(a,p)||m||r(!1,g.nativeEvent,"focus")})}}}:{},[i,l,a,o,r])}const G0="active",X0="selected";function rd(t,e,n){const r=new Map,s=n==="item";let o=t;if(s&&t){const{[G0]:a,[X0]:i,...l}=t;o=l}return{...n==="floating"&&{tabIndex:-1},...o,...e.map(a=>{const i=a?a[n]:null;return typeof i=="function"?t?i(t):null:i}).concat(t).reduce((a,i)=>(i&&Object.entries(i).forEach(l=>{let[c,d]=l;if(!(s&&[G0,X0].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),a[c]=function(){for(var g,h=arguments.length,m=new Array(h),p=0;p<h;p++)m[p]=arguments[p];return(g=r.get(c))==null?void 0:g.map(b=>b(...m)).find(b=>b!==void 0)}}}else a[c]=d}),a),{})}}function K0(t){t===void 0&&(t=[]);const e=t,n=Y.useCallback(o=>rd(o,t,"reference"),e),r=Y.useCallback(o=>rd(o,t,"floating"),e),s=Y.useCallback(o=>rd(o,t,"item"),t.map(o=>o==null?void 0:o.item));return Y.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:s}),[n,r,s])}let Z0=!1;function mi(t,e,n){switch(t){case"vertical":return e;case"horizontal":return n;default:return e||n}}function Q0(t,e){return mi(e,t===Kc||t===Eo,t===Es||t===Ts)}function sd(t,e,n){return mi(e,t===Eo,n?t===Es:t===Ts)||t==="Enter"||t===" "||t===""}function I3(t,e,n){return mi(e,n?t===Es:t===Ts,t===Eo)}function J0(t,e,n){return mi(e,n?t===Ts:t===Es,t===Kc)}function A3(t,e){const{open:n,onOpenChange:r,refs:s,elements:{domReference:o,floating:a}}=t,{listRef:i,activeIndex:l,onNavigate:c=()=>{},enabled:d=!0,selectedIndex:u=null,allowEscape:g=!1,loop:h=!1,nested:m=!1,rtl:p=!1,virtual:b=!1,focusItemOnOpen:y="auto",focusItemOnHover:x=!0,openOnArrowKeyDown:k=!0,disabledIndices:v=void 0,orientation:w="vertical",cols:C=1,scrollItemIntoView:N=!0,virtualItemRef:T,itemSizes:I,dense:D=!1}=e;process.env.NODE_ENV!=="production"&&(g&&(h||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(" "))),w==="vertical"&&C>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const z=ui(),L=No(),P=kn(c),M=Y.useRef(y),E=Y.useRef(u??-1),S=Y.useRef(null),B=Y.useRef(!0),W=Y.useRef(P),X=Y.useRef(!!a),j=Y.useRef(!1),V=Y.useRef(!1),A=_n(v),R=_n(n),F=_n(N),[O,H]=Y.useState(),[q,Z]=Y.useState(),$=kn(function(G,ce,U){U===void 0&&(U=!1);const ne=G.current[ce.current];ne&&(b?(H(ne.id),L==null||L.events.emit("virtualfocus",ne),T&&(T.current=ne)):Un(ne,{preventScroll:!0,sync:qh()&&Ac()?Z0||j.current:!1}),requestAnimationFrame(()=>{const ae=F.current;ae&&ne&&(U||!B.current)&&(ne.scrollIntoView==null||ne.scrollIntoView(typeof ae=="boolean"?{block:"nearest",inline:"nearest"}:ae))}))});Be(()=>{document.createElement("div").focus({get preventScroll(){return Z0=!0,!1}})},[]),Be(()=>{d&&(n&&a?M.current&&u!=null&&(V.current=!0,E.current=u,P(u)):X.current&&(E.current=-1,W.current(null)))},[d,n,a,u,P]),Be(()=>{if(d&&n&&a)if(l==null){if(j.current=!1,u!=null)return;if(X.current&&(E.current=-1,$(i,E)),!X.current&&M.current&&(S.current!=null||M.current===!0&&S.current==null)){let G=0;const ce=()=>{i.current[0]==null?(G<2&&(G?requestAnimationFrame:queueMicrotask)(ce),G++):(E.current=S.current==null||sd(S.current,w,p)||m?Zc(i,A.current):C0(i,A.current),S.current=null,P(E.current))};ce()}}else To(i,l)||(E.current=l,$(i,E,V.current),V.current=!1)},[d,n,a,l,u,m,i,w,p,P,$,A]),Be(()=>{var G;if(!d||a||!L||b||!X.current)return;const ce=L.nodesRef.current,U=(G=ce.find(oe=>oe.id===z))==null||(G=G.context)==null?void 0:G.elements.floating,ne=wn(Ot(a)),ae=ce.some(oe=>oe.context&&st(oe.context.elements.floating,ne));U&&!ae&&B.current&&U.focus({preventScroll:!0})},[d,a,L,z,b]),Be(()=>{if(!d||!L||!b||z)return;function G(ce){Z(ce.id),T&&(T.current=ce)}return L.events.on("virtualfocus",G),()=>{L.events.off("virtualfocus",G)}},[d,L,b,z,T]),Be(()=>{W.current=P,X.current=!!a}),Be(()=>{n||(S.current=null)},[n]);const te=l!=null,le=Y.useMemo(()=>{function G(U){if(!n)return;const ne=i.current.indexOf(U);ne!==-1&&P(ne)}return{onFocus(U){let{currentTarget:ne}=U;G(ne)},onClick:U=>{let{currentTarget:ne}=U;return ne.focus({preventScroll:!0})},...x&&{onMouseMove(U){let{currentTarget:ne}=U;G(ne)},onPointerLeave(U){let{pointerType:ne}=U;!B.current||ne==="touch"||(E.current=-1,$(i,E),P(null),b||Un(s.floating.current,{preventScroll:!0}))}}}},[n,s,$,x,i,P,b]);return Y.useMemo(()=>{if(!d)return{};const G=A.current;function ce(ie){if(B.current=!1,j.current=!0,!R.current&&ie.currentTarget===s.floating.current)return;if(m&&J0(ie.key,w,p)){yt(ie),r(!1,ie.nativeEvent,"list-navigation"),bt(o)&&!b&&o.focus();return}const xe=E.current,be=Zc(i,G),De=C0(i,G);if(ie.key==="Home"&&(yt(ie),E.current=be,P(E.current)),ie.key==="End"&&(yt(ie),E.current=De,P(E.current)),C>1){const Qe=I||Array.from({length:i.current.length},()=>({width:1,height:1})),rt=o3(Qe,C,D),Jt=rt.findIndex($t=>$t!=null&&!(G!=null&&G.includes($t))),qt=rt.reduce(($t,Nr,en)=>Nr!=null&&!(G!=null&&G.includes(Nr))?en:$t,-1);if(E.current=rt[s3({current:rt.map($t=>$t!=null?i.current[$t]:null)},{event:ie,orientation:w,loop:h,cols:C,disabledIndices:i3([...G||[],void 0],rt),minIndex:Jt,maxIndex:qt,prevIndex:a3(E.current,Qe,rt,C,ie.key===Eo?"bl":ie.key===Ts?"tr":"tl"),stopEvent:!0})],P(E.current),w==="both")return}if(Q0(ie.key,w)){if(yt(ie),n&&!b&&wn(ie.currentTarget.ownerDocument)===ie.currentTarget){E.current=sd(ie.key,w,p)?be:De,P(E.current);return}sd(ie.key,w,p)?h?E.current=xe>=De?g&&xe!==i.current.length?-1:be:kt(i,{startingIndex:xe,disabledIndices:G}):E.current=Math.min(De,kt(i,{startingIndex:xe,disabledIndices:G})):h?E.current=xe<=be?g&&xe!==-1?i.current.length:De:kt(i,{startingIndex:xe,decrement:!0,disabledIndices:G}):E.current=Math.max(be,kt(i,{startingIndex:xe,decrement:!0,disabledIndices:G})),To(i,E.current)?P(null):P(E.current)}}function U(ie){y==="auto"&&Jh(ie.nativeEvent)&&(M.current=!0)}function ne(ie){M.current=y,y==="auto"&&Ic(ie.nativeEvent)&&(M.current=!0)}const ae=b&&n&&te&&{"aria-activedescendant":q||O},oe=i.current.find(ie=>(ie==null?void 0:ie.id)===O);return{reference:{...ae,onKeyDown(ie){B.current=!1;const xe=ie.key.indexOf("Arrow")===0,be=I3(ie.key,w,p),De=J0(ie.key,w,p),Qe=Q0(ie.key,w),rt=(m?be:Qe)||ie.key==="Enter"||ie.key.trim()==="";if(b&&n){const Nr=L==null?void 0:L.nodesRef.current.find(vc=>vc.parentId==null),en=L&&Nr?w3(L.nodesRef.current,Nr.id):null;if(xe&&en&&T){const vc=new KeyboardEvent("keydown",{key:ie.key,bubbles:!0});if(be||De){var Jt,qt;const NL=((Jt=en.context)==null?void 0:Jt.elements.domReference)===ie.currentTarget,C2=De&&!NL?(qt=en.context)==null?void 0:qt.elements.domReference:be?oe:null;C2&&(yt(ie),C2.dispatchEvent(vc),Z(void 0))}if(Qe&&en.context&&en.context.open&&en.parentId&&ie.currentTarget!==en.context.elements.domReference){var $t;yt(ie),($t=en.context.elements.domReference)==null||$t.dispatchEvent(vc);return}}return ce(ie)}if(!(!n&&!k&&xe)){if(rt&&(S.current=m&&Qe?null:ie.key),m){be&&(yt(ie),n?(E.current=Zc(i,G),P(E.current)):r(!0,ie.nativeEvent,"list-navigation"));return}Qe&&(u!=null&&(E.current=u),yt(ie),!n&&k?r(!0,ie.nativeEvent,"list-navigation"):ce(ie),n&&P(E.current))}},onFocus(){n&&P(null)},onPointerDown:ne,onMouseDown:U,onClick:U},floating:{"aria-orientation":w==="both"?void 0:w,...!$h(o)&&ae,onKeyDown:ce,onPointerMove(){B.current=!0}},item:le}},[o,s,O,q,A,R,i,d,w,p,b,n,te,m,u,k,g,C,h,y,P,r,le,L,T,I,D])}const L3=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function q0(t,e){var n;e===void 0&&(e={});const{open:r,floatingId:s}=t,{enabled:o=!0,role:a="dialog"}=e,i=(n=L3.get(a))!=null?n:a,l=di(),d=ui()!=null;return Y.useMemo(()=>{if(!o)return{};const u={id:s,...i&&{role:i}};return i==="tooltip"||a==="label"?{reference:{["aria-"+(a==="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"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},floating:{...u,...i==="menu"&&{"aria-labelledby":l}},item(g){let{active:h,selected:m}=g;const p={role:"option",...h&&{id:s+"-option"}};switch(a){case"select":return{...p,"aria-selected":h&&m};case"combobox":return{...p,...h&&{"aria-selected":!0}}}return{}}}},[o,a,i,r,s,l,d])}function R3(t,e){var n;const{open:r,dataRef:s}=t,{listRef:o,activeIndex:a,onMatch:i,onTypingChange:l,enabled:c=!0,findMatch:d=null,resetMs:u=750,ignoreKeys:g=[],selectedIndex:h=null}=e,m=Y.useRef(),p=Y.useRef(""),b=Y.useRef((n=h??a)!=null?n:-1),y=Y.useRef(null),x=kn(i),k=kn(l),v=_n(d),w=_n(g);return Be(()=>{r&&(clearTimeout(m.current),y.current=null,p.current="")},[r]),Be(()=>{if(r&&p.current===""){var C;b.current=(C=h??a)!=null?C:-1}},[r,h,a]),Y.useMemo(()=>{if(!c)return{};function C(I){I?s.current.typing||(s.current.typing=I,k(I)):s.current.typing&&(s.current.typing=I,k(I))}function N(I,D,z){const L=v.current?v.current(D,z):D.find(P=>(P==null?void 0:P.toLocaleLowerCase().indexOf(z.toLocaleLowerCase()))===0);return L?I.indexOf(L):-1}function T(I){const D=o.current;if(p.current.length>0&&p.current[0]!==" "&&(N(D,D,p.current)===-1?C(!1):I.key===" "&&yt(I)),D==null||w.current.includes(I.key)||I.key.length!==1||I.ctrlKey||I.metaKey||I.altKey)return;r&&I.key!==" "&&(yt(I),C(!0)),D.every(M=>{var E,S;return M?((E=M[0])==null?void 0:E.toLocaleLowerCase())!==((S=M[1])==null?void 0:S.toLocaleLowerCase()):!0})&&p.current===I.key&&(p.current="",b.current=y.current),p.current+=I.key,clearTimeout(m.current),m.current=setTimeout(()=>{p.current="",b.current=y.current,C(!1)},u);const L=b.current,P=N(D,[...D.slice((L||0)+1),...D.slice(0,(L||0)+1)],p.current);P!==-1?(x(P),y.current=P):I.key!==" "&&(p.current="",C(!1))}return{reference:{onKeyDown:T},floating:{onKeyDown:T,onKeyUp(I){I.key===" "&&C(!1)}}}},[c,r,s,o,u,w,v,x,k])}function $0(t,e){const[n,r]=t;let s=!1;const o=e.length;for(let a=0,i=o-1;a<o;i=a++){const[l,c]=e[a]||[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 F3(t,e){return t[0]>=e.x&&t[0]<=e.x+e.width&&t[1]>=e.y&&t[1]<=e.y+e.height}function B3(t){t===void 0&&(t={});const{buffer:e=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=t;let s,o=!1,a=null,i=null,l=performance.now();function c(u,g){const h=performance.now(),m=h-l;if(a===null||i===null||m===0)return a=u,i=g,l=h,null;const p=u-a,b=g-i,x=Math.sqrt(p*p+b*b)/m;return a=u,i=g,l=h,x}const d=u=>{let{x:g,y:h,placement:m,elements:p,onClose:b,nodeId:y,tree:x}=u;return function(v){function w(){clearTimeout(s),b()}if(clearTimeout(s),!p.domReference||!p.floating||m==null||g==null||h==null)return;const{clientX:C,clientY:N}=v,T=[C,N],I=gr(v),D=v.type==="mouseleave",z=st(p.floating,I),L=st(p.domReference,I),P=p.domReference.getBoundingClientRect(),M=p.floating.getBoundingClientRect(),E=m.split("-")[0],S=g>M.right-M.width/2,B=h>M.bottom-M.height/2,W=F3(T,P),X=M.width>P.width,j=M.height>P.height,V=(X?P:M).left,A=(X?P:M).right,R=(j?P:M).top,F=(j?P:M).bottom;if(z&&(o=!0,!D))return;if(L&&(o=!1),L&&!D){o=!0;return}if(D&&Ae(v.relatedTarget)&&st(p.floating,v.relatedTarget)||x&&zr(x.nodesRef.current,y).some(q=>{let{context:Z}=q;return Z==null?void 0:Z.open}))return;if(E==="top"&&h>=P.bottom-1||E==="bottom"&&h<=P.top+1||E==="left"&&g>=P.right-1||E==="right"&&g<=P.left+1)return w();let O=[];switch(E){case"top":O=[[V,P.top+1],[V,M.bottom-1],[A,M.bottom-1],[A,P.top+1]];break;case"bottom":O=[[V,M.top+1],[V,P.bottom-1],[A,P.bottom-1],[A,M.top+1]];break;case"left":O=[[M.right-1,F],[M.right-1,R],[P.left+1,R],[P.left+1,F]];break;case"right":O=[[P.right-1,F],[P.right-1,R],[M.left+1,R],[M.left+1,F]];break}function H(q){let[Z,$]=q;switch(E){case"top":{const te=[X?Z+e/2:S?Z+e*4:Z-e*4,$+e+1],le=[X?Z-e/2:S?Z+e*4:Z-e*4,$+e+1],G=[[M.left,S||X?M.bottom-e:M.top],[M.right,S?X?M.bottom-e:M.top:M.bottom-e]];return[te,le,...G]}case"bottom":{const te=[X?Z+e/2:S?Z+e*4:Z-e*4,$-e],le=[X?Z-e/2:S?Z+e*4:Z-e*4,$-e],G=[[M.left,S||X?M.top+e:M.bottom],[M.right,S?X?M.top+e:M.bottom:M.top+e]];return[te,le,...G]}case"left":{const te=[Z+e+1,j?$+e/2:B?$+e*4:$-e*4],le=[Z+e+1,j?$-e/2:B?$+e*4:$-e*4];return[...[[B||j?M.right-e:M.left,M.top],[B?j?M.right-e:M.left:M.right-e,M.bottom]],te,le]}case"right":{const te=[Z-e,j?$+e/2:B?$+e*4:$-e*4],le=[Z-e,j?$-e/2:B?$+e*4:$-e*4],G=[[B||j?M.left+e:M.right,M.top],[B?j?M.left+e:M.right:M.left+e,M.bottom]];return[te,le,...G]}}}if(!$0([C,N],O)){if(o&&!W)return w();if(!D&&r){const q=c(v.clientX,v.clientY);if(q!==null&&q<.1)return w()}$0([C,N],H([g,h]))?!o&&r&&(s=window.setTimeout(w,40)):w()}}};return d.__options={blockPointerEvents:n},d}const W3=({arrowRef:t,placement:e})=>{const n=[];return n.push(j5(8)),n.push(e==="auto"?L5():A5()),n.push(I5({padding:8})),t!=null&&t.current&&n.push(R5({element:t.current})),n},z3=({placement:t})=>t==="auto"?void 0:t,H3=({placement:t})=>({top:"bottom",right:"left",bottom:"top",left:"right"})[t.split("-")[0]],eg=({open:t,arrowRef:e,placement:n="top",setOpen:r})=>U0({placement:z3({placement:n}),open:t,onOpenChange:r,whileElementsMounted:g0,middleware:W3({placement:n,arrowRef:e})}),tg=({context:t,trigger:e,role:n="tooltip",interactions:r=[]})=>K0([H0(t,{enabled:e==="click"}),b3(t,{enabled:e==="hover",handleClose:B3()}),Y0(t),q0(t,{role:n}),...r]),ng=_.createContext(void 0);function od(){const t=_.useContext(ng);if(!t)throw new Error("useDropdownContext should be used within the DropdownContext provider!");return t}const ad=({className:t,theme:e={},...n})=>{const{theme:r}=od(),s=e.divider??r.floating.divider;return f.jsx("div",{className:Q(s,t),...n})},rg=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=od(),o=n.header??s.floating.header;return f.jsxs(f.Fragment,{children:[f.jsx("div",{className:Q(o,e),...r,children:t}),f.jsx(ad,{})]})},id=_.forwardRef(({children:t,className:e,icon:n,onClick:r,theme:s={},...o},a)=>{const{ref:i,index:l}=u3({label:typeof t=="string"?t:void 0}),c=_0([a,i]),{theme:d,activeIndex:u,dismissOnClick:g,getItemProps:h,handleSelect:m}=od(),p=u===l,b=re(d.floating.item,s),y=o;return f.jsx("li",{role:"menuitem",className:b.container,children:f.jsxs(Mc,{ref:c,className:Q(b.base,e),...y,...h({onClick:()=>{r==null||r(),g&&m(null)}}),tabIndex:p?0:-1,children:[n&&f.jsx(n,{className:b.icon}),t]})})});id.displayName="DropdownItem";const V3={top:r1,right:hh,bottom:fh,left:n1},Y3=({refs:t,children:e,inline:n,theme:r,disabled:s,setButtonWidth:o,getReferenceProps:a,renderTrigger:i,...l})=>{const c=t.reference,d=a();if(_.useEffect(()=>{c.current&&(o==null||o(c.current.clientWidth))},[c,o]),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(Lh,{...l,disabled:s,type:"button",ref:t.setReference,...d,children:e})},sg=({children:t,className:e,dismissOnClick:n=!0,theme:r={},renderTrigger:s,...o})=>{const[a,i]=_.useState(!1),[l,c]=_.useState(null),[d,u]=_.useState(null),[g,h]=_.useState(void 0),m=_.useRef([]),p=_.useRef([]),b=re(pe().dropdown,r),y=o,x=o["data-testid"]||"flowbite-dropdown-target",{placement:k=o.inline?"bottom-start":"bottom",trigger:v="click",label:w,inline:C,arrowIcon:N=!0,...T}=y,I=_.useCallback(j=>{u(j),i(!1)},[]),D=_.useCallback(j=>{a?c(j):I(j)},[a,I]),{context:z,floatingStyles:L,refs:P}=eg({open:a,setOpen:i,placement:k}),M=A3(z,{listRef:m,activeIndex:l,selectedIndex:d,onNavigate:c}),E=R3(z,{listRef:p,activeIndex:l,selectedIndex:d,onMatch:D}),{getReferenceProps:S,getFloatingProps:B,getItemProps:W}=tg({context:z,role:"menu",trigger:v,interactions:[M,E]}),X=_.useMemo(()=>{const[j]=k.split("-");return V3[j]??fh},[k]);return f.jsxs(ng.Provider,{value:{theme:b,activeIndex:l,dismissOnClick:n,getItemProps:W,handleSelect:I},children:[f.jsxs(Y3,{...T,refs:P,inline:C,theme:b,"data-testid":x,className:Q(b.floating.target,T.className),setButtonWidth:h,getReferenceProps:S,renderTrigger:s,children:[w,N&&f.jsx(X,{className:b.arrowIcon})]}),a&&f.jsx(B0,{context:z,modal:!1,children:f.jsx("div",{ref:P.setFloating,style:{...L,minWidth:g},"data-testid":"flowbite-dropdown","aria-expanded":a,...B({className:Q(b.floating.base,b.floating.animation,"duration-100",!a&&b.floating.hidden,b.floating.style.auto,e)}),children:f.jsx(d3,{elementsRef:m,labelsRef:p,children:f.jsx("ul",{className:b.content,tabIndex:-1,children:t})})})})]})};sg.displayName="Dropdown",rg.displayName="Dropdown.Header",ad.displayName="Dropdown.Divider";const U3=Object.assign(sg,{Item:id,Header:rg,Divider:ad}),og=_.forwardRef(({className:t,color:e="gray",helperText:n,sizing:r="md",theme:s={},...o},a)=>{const i=re(pe().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]),...o,type:"file",ref:a})})}),n&&f.jsx(So,{color:e,children:n})]})});og.displayName="FileInput";const G3=_.forwardRef(({label:t,helperText:e,color:n="default",sizing:r="md",variant:s,disabled:o=!1,theme:a={},className:i,...l},c)=>{const d=_.useId(),u=re(pe().floatingLabel,a);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:o,...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})]})});G3.displayName="FloatingLabel";const ag=({alt:t,className:e,children:n,href:r,name:s,src:o,theme:a={},...i})=>{const l=re(pe().footer.brand,a);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:o,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:o,className:Q(l.img,e),...i})})},ig=({by:t,className:e,href:n,theme:r={},year:s,...o})=>{const a=re(pe().footer.copyright,r);return f.jsxs("div",{"data-testid":"flowbite-footer-copyright",className:Q(a.base,e),...o,children:["© ",s,n?f.jsx("a",{href:n,className:a.href,children:t}):f.jsx("span",{"data-testid":"flowbite-footer-copyright-span",className:a.span,children:t})]})},lg=({className:t,theme:e={},...n})=>{const r=re(pe().footer.divider,e);return f.jsx("hr",{"data-testid":"footer-divider",className:Q(r.base,t),...n})},cg=({ariaLabel:t,className:e,href:n,icon:r,theme:s={},...o})=>{const a=re(pe().footer.icon,s);return f.jsx("div",{children:n?f.jsx("a",{"aria-label":t,"data-testid":"flowbite-footer-icon",href:n,className:Q(a.base,e),...o,children:f.jsx(r,{className:a.size})}):f.jsx(r,{"data-testid":"flowbite-footer-icon",className:a.size,...o})})},dg=({as:t="a",children:e,className:n,href:r,theme:s={},...o})=>{const a=re(pe().footer.groupLink.link,s);return f.jsx("li",{className:Q(a.base,n),children:f.jsx(t,{href:r,className:a.href,...o,children:e})})},ug=({children:t,className:e,col:n=!1,theme:r={},...s})=>{const o=re(pe().footer.groupLink,r);return f.jsx("ul",{"data-testid":"footer-groupLink",className:Q(o.base,n&&o.col,e),...s,children:t})},fg=({as:t="h2",className:e,theme:n={},title:r,...s})=>{const o=re(pe().footer.title,n);return f.jsx(t,{"data-testid":"flowbite-footer-title",className:Q(o.base,e),...s,children:r})},hg=({bgDark:t=!1,children:e,className:n,container:r=!1,theme:s={},...o})=>{const a=re(pe().footer,s);return f.jsx("footer",{"data-testid":"flowbite-footer",className:Q(a.root.base,t&&a.root.bgDark,r&&a.root.container,n),...o,children:e})};hg.displayName="Footer",ig.displayName="Footer.Copyright",dg.displayName="Footer.Link",ag.displayName="Footer.Brand",ug.displayName="Footer.LinkGroup",cg.displayName="Footer.Icon",fg.displayName="Footer.Title",lg.displayName="Footer.Divider",Object.assign(hg,{Copyright:ig,Link:dg,LinkGroup:ug,Brand:ag,Icon:cg,Title:fg,Divider:lg});const pi=({children:t,className:e,color:n="default",disabled:r=!1,theme:s={},value:o,...a})=>{const i=re(pe().label,s);return f.jsx("label",{className:Q(i.root.base,i.root.colors[n],r&&i.root.disabled,e),"data-testid":"flowbite-label",...a,children:o??t??""})};pi.displayName="Label";const gg=({children:t,className:e,icon:n,theme:r={},...s})=>{const o=re(pe().list.item,r);return f.jsxs("li",{className:Q(o.withIcon[n?"on":"off"],e),...s,children:[n&&f.jsx(n,{className:Q(o.icon)}),t]})},mg=({children:t,className:e,unstyled:n,nested:r,ordered:s,horizontal:o,theme:a={},...i})=>{const l=re(pe().list,a),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,o&&l.root.horizontal,e),...i,children:t})};mg.displayName="List",gg.displayName="List.Item",Object.assign(mg,{Item:gg});const pg=({active:t,children:e,className:n,href:r,icon:s,onClick:o,theme:a={},disabled:i,...l})=>{const c=re(pe().listGroup.item,a),d=typeof r<"u",u=d?"a":"button";return f.jsx("li",{className:Q(c.base,n),children:f.jsxs(u,{href:r,onClick:o,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]})})},bg=({children:t,className:e,theme:n={},...r})=>{const s=re(pe().listGroup,n);return f.jsx("ul",{className:Q(s.root.base,e),...r,children:t})};bg.displayName="ListGroup",pg.displayName="ListGroup.Item",Object.assign(bg,{Item:pg});const yg=_.createContext(void 0);function ld(){const t=_.useContext(yg);if(!t)throw new Error("useModalContext should be used within the ModalContext provider!");return t}const wg=({children:t,className:e,theme:n={},...r})=>{const{theme:s,popup:o}=ld(),a=re(s.body,n);return f.jsx("div",{className:Q(a.base,o&&[a.popup],e),...r,children:t})},vg=({children:t,className:e,theme:n={},...r})=>{const{theme:s,popup:o}=ld(),a=re(s.footer,n);return f.jsx("div",{className:Q(a.base,!o&&a.popup,e),...r,children:t})},xg=({as:t="h3",children:e,className:n,theme:r={},id:s,...o})=>{const a=_.useId(),i=s||a,{theme:l,popup:c,onClose:d,setHeaderId:u}=ld(),g=re(l.header,r);return _.useLayoutEffect(()=>(u(i),()=>u(void 0)),[i,u]),f.jsxs("div",{className:Q(g.base,c&&g.popup,n),...o,children:[f.jsx(t,{id:i,className:g.title,children:e}),f.jsx("button",{"aria-label":"Close",className:g.close.base,type:"button",onClick:d,children:f.jsx(s1,{"aria-hidden":!0,className:g.close.icon})})]})},kg=_.forwardRef(({children:t,className:e,dismissible:n=!1,onClose:r,popup:s,position:o="center",root:a,show:i,size:l="2xl",theme:c={},initialFocus:d,...u},g)=>{const[h,m]=_.useState(void 0),p=re(pe().modal,c),{context:b}=U0({open:i,onOpenChange:()=>r&&r()}),y=_0([b.refs.setFloating,g]),x=H0(b),k=Y0(b,{outsidePressEvent:"mousedown",enabled:n}),v=q0(b),{getFloatingProps:w}=K0([x,k,v]);return i?f.jsx(yg.Provider,{value:{theme:p,popup:s,onClose:r,setHeaderId:m},children:f.jsx(O3,{root:a,children:f.jsx(T3,{lockScroll:!0,"data-testid":"modal-overlay",className:Q(p.root.base,p.root.positions[o],i?p.root.show.on:p.root.show.off,e),...u,children:f.jsx(B0,{context:b,initialFocus:d,children:f.jsx("div",{ref:y,...w(u),"aria-labelledby":h,className:Q(p.content.base,p.root.sizes[l]),children:f.jsx("div",{className:p.content.inner,children:t})})})})})}):null});kg.displayName="Modal",xg.displayName="Modal.Header",wg.displayName="Modal.Body",vg.displayName="Modal.Footer",Object.assign(kg,{Header:xg,Body:wg,Footer:vg});const _g=_.createContext(void 0);function bi(){const t=_.useContext(_g);if(!t)throw new Error("useNavBarContext should be used within the NavbarContext provider!");return t}const Cg=({as:t="a",children:e,className:n,theme:r={},...s})=>{const{theme:o}=bi(),a=re(o.brand,r);return f.jsx(t,{className:Q(a.base,n),...s,children:e})},Sg=({children:t,className:e,theme:n={},...r})=>{const{theme:s,isOpen:o}=bi(),a=re(s.collapse,n);return f.jsx("div",{"data-testid":"flowbite-navbar-collapse",className:Q(a.base,a.hidden[o?"off":"on"],e),...r,children:f.jsx("ul",{className:a.list,children:t})})},Mg=({active:t,as:e="a",disabled:n,children:r,className:s,theme:o={},onClick:a,...i})=>{const{theme:l,setIsOpen:c}=bi(),d=re(l.link,o),u=g=>{c(!1),a==null||a(g)};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 X3(t){return Ie({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 Ns(t){return Ie({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 K3(t){return Ie({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 cd(t){return Ie({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 Z3(t){return Ie({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 Q3(t){return Ie({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 J3(t){return Ie({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 Og=({barIcon:t=X3,className:e,theme:n={},...r})=>{const{theme:s,isOpen:o,setIsOpen:a}=bi(),i=re(s.toggle,n),l=()=>{a(!o)};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})]})},Dg=({border:t,children:e,className:n,fluid:r=!1,menuOpen:s,rounded:o,theme:a={},...i})=>{const[l,c]=_.useState(s),d=re(pe().navbar,a);return f.jsx(_g.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[o?"on":"off"],n),...i,children:f.jsx("div",{className:Q(d.root.inner.base,d.root.inner.fluid[r?"on":"off"]),children:e})})})};Dg.displayName="Navbar",Cg.displayName="Navbar.Brand",Sg.displayName="Navbar.Collapse",Mg.displayName="Navbar.Link",Og.displayName="Navbar.Toggle",Object.assign(Dg,{Brand:Cg,Collapse:Sg,Link:Mg,Toggle:Og});const q3=(t,e)=>t>=e?[]:[...Array(e-t+1).keys()].map(n=>n+t),dd=({active:t,children:e,className:n,onClick:r,theme:s={},...o})=>{const a=re(pe().pagination,s);return f.jsx("button",{type:"button",className:Q(t&&a.pages.selector.active,n),onClick:r,...o,children:e})};dd.displayName="Pagination.Button";const ud=({children:t,className:e,onClick:n,theme:r={},disabled:s=!1,...o})=>{const a=re(pe().pagination,r);return f.jsx("button",{type:"button",className:Q(s&&a.pages.selector.disabled,e),disabled:s,onClick:n,...o,children:t})};ud.displayName="Pagination.Navigation";const Eg=({className:t,currentPage:e,layout:n="pagination",nextLabel:r="Next",onPageChange:s,previousLabel:o="Previous",renderPaginationButton:a=u=>f.jsx(dd,{...u}),showIcons:i=!1,theme:l={},totalPages:c,...d})=>{const u=re(pe().pagination,l),g=Math.min(Math.max(n==="pagination"?e+2:e+4,5),c),h=Math.max(1,g-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:h})," to ",f.jsx("span",{className:u.layout.table.span,children:g})," 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(ud,{className:Q(u.pages.previous.base,i&&u.pages.showIcon),onClick:p,disabled:e===1,children:[i&&f.jsx(q2,{"aria-hidden":!0,className:u.pages.previous.icon}),o]})}),n==="pagination"&&q3(h,g).map(b=>f.jsx("li",{"aria-current":b===e?"page":void 0,children:a({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(ud,{className:Q(u.pages.next.base,i&&u.pages.showIcon),onClick:m,disabled:e===c,children:[r,i&&f.jsx($2,{"aria-hidden":!0,className:u.pages.next.icon})]})})]})]})};Eg.displayName="Pagination",Object.assign(Eg,{Button:dd});const Tg=_.forwardRef(({className:t,theme:e={},...n},r)=>{const s=re(pe().radio,e);return f.jsx("input",{ref:r,type:"radio",className:Q(s.root.base,t),...n})});Tg.displayName="Radio";const $3=_.forwardRef(({className:t,sizing:e="md",theme:n={},...r},s)=>{const o=re(pe().rangeSlider,n);return f.jsx(f.Fragment,{children:f.jsx("div",{"data-testid":"flowbite-range-slider",className:Q(o.root.base,t),children:f.jsx("div",{className:o.field.base,children:f.jsx("input",{ref:s,type:"range",className:Q(o.field.input.base,o.field.input.sizes[e]),...r})})})})});$3.displayName="RangeSlider";const Pg=({children:t,className:e,percentFilled:n=0,theme:r={},...s})=>{const o=re(pe().ratingAdvanced,r);return f.jsxs("div",{className:Q(o.base,e),...s,children:[f.jsx("span",{className:o.label,children:t}),f.jsx("div",{className:o.progress.base,children:f.jsx("div",{className:o.progress.fill,"data-testid":"flowbite-rating-fill",style:{width:`${n}%`}})}),f.jsx("span",{className:o.progress.label,children:`${n}%`})]})},Ng=_.createContext(void 0);function e_(){const t=_.useContext(Ng);if(!t)throw new Error("useRatingContext should be used within the RatingContext provider!");return t}const jg=({className:t,filled:e=!0,starIcon:n=e1,theme:r={},...s})=>{const{theme:o,size:a="sm"}=e_(),i=re(o.star,r);return f.jsx(n,{"data-testid":"flowbite-rating-star",className:Q(i.sizes[a],i[e?"filled":"empty"],t),...s})},Ig=({children:t,className:e,size:n="sm",theme:r={},...s})=>{const o=re(pe().rating,r);return f.jsx(Ng.Provider,{value:{theme:o,size:n},children:f.jsx("div",{className:Q(o.root.base,e),...s,children:t})})};Ig.displayName="Rating",jg.displayName="Rating.Star",Pg.displayName="Rating.Advanced",Object.assign(Ig,{Star:jg,Advanced:Pg});const t_=_.forwardRef(({addon:t,children:e,className:n,color:r="gray",helperText:s,icon:o,shadow:a,sizing:i="md",theme:l={},...c},d)=>{const u=re(pe().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:[o&&f.jsx("div",{className:u.field.icon.base,children:f.jsx(o,{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[o?"on":"off"],u.field.select.withAddon[t?"on":"off"],u.field.select.withShadow[a?"on":"off"]),...c,ref:d,children:e}),s&&f.jsx(So,{color:r,children:s})]})]})});t_.displayName="Select";const n_=({animation:t="duration-300",arrow:e=!0,children:n,className:r,content:s,placement:o="top",style:a="dark",theme:i,trigger:l="hover",minWidth:c,...d})=>{const u=_.useRef(null),[g,h]=_.useState(!1),m=eg({open:g,placement:o,arrowRef:u,setOpen:h}),{context:p,middlewareData:{arrow:{x:b,y}={}},refs:x,strategy:k,update:v,x:w,y:C}=m,N=j3(p),{getFloatingProps:T,getReferenceProps:I}=tg({context:p,role:"tooltip",trigger:l,interactions:[N]});return _.useEffect(()=>{if(x.reference.current&&x.floating.current&&g)return g0(x.reference.current,x.floating.current,v)},[g,x.floating,x.reference,v]),f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:x.setReference,className:i.target,"data-testid":"flowbite-tooltip-target",...I(),children:n}),f.jsxs("div",{ref:x.setFloating,"data-testid":"flowbite-tooltip",...T({className:Q(i.base,t&&`${i.animation} ${t}`,!g&&i.hidden,i.style[a],r),style:{position:k,top:C??" ",left:w??" ",minWidth:c},...d}),children:[f.jsx("div",{className:i.content,children:s}),e&&f.jsx("div",{className:Q(i.arrow.base,a==="dark"&&i.arrow.style.dark,a==="light"&&i.arrow.style.light,a==="auto"&&i.arrow.style.auto),"data-testid":"flowbite-tooltip-arrow",ref:u,style:{top:y??" ",left:b??" ",right:" ",bottom:" ",[H3({placement:m.placement})]:i.arrow.placement},children:" "})]})]})},yi=({animation:t="duration-300",arrow:e=!0,children:n,className:r,content:s,placement:o="top",style:a="dark",theme:i={},trigger:l="hover",...c})=>{const d=re(pe().tooltip,i);return f.jsx(n_,{animation:t,arrow:e,content:s,placement:o,style:a,theme:d,trigger:l,className:r,...c,children:n})};yi.displayName="Tooltip";const Ag=_.createContext(void 0);function js(){const t=_.useContext(Ag);if(!t)throw new Error("useSidebarContext should be used within the SidebarContext provider!");return t}const fd=_.createContext(void 0);function r_(){const t=_.useContext(fd);if(!t)throw new Error("useSidebarItemContext should be used within the SidebarItemContext provider!");return t}const Lg=({children:t,className:e,icon:n,label:r,chevronIcon:s=_c,renderChevronIcon:o,open:a=!1,theme:i={},...l})=>{const c=_.useId(),[d,u]=_.useState(a),{theme:g,isCollapsed:h}=js(),m=re(g.collapse,i);_.useEffect(()=>u(a),[a]);const p=({children:b})=>f.jsx("li",{children:h&&!d?f.jsx(yi,{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"])}),h?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}),o?o(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(fd.Provider,{value:{isInsideCollapse:!0},children:t})})]})};Lg.displayName="Sidebar.Collapse";const Rg=({children:t,color:e="info",className:n,theme:r={},...s})=>{const{theme:o,isCollapsed:a}=js(),i=re(o.cta,r);return f.jsx("div",{"data-testid":"sidebar-cta",hidden:a,className:Q(i.base,i.color[e],n),...s,children:t})};Rg.displayName="Sidebar.CTA";const s_=({id:t,theme:e,isCollapsed:n,tooltipChildren:r,children:s,...o})=>f.jsx("li",{...o,children:n?f.jsx(yi,{content:f.jsx(Fg,{id:t,theme:e,children:r}),placement:"right",children:s}):s}),Fg=({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}),Bg=_.forwardRef(({active:t,as:e="a",children:n,className:r,icon:s,label:o,labelColor:a="info",theme:i={},...l},c)=>{var p,b,y,x;const d=_.useId(),{theme:u,isCollapsed:g}=js(),{isInsideCollapse:h}=r_(),m=re(u.item,i);return f.jsx(s_,{theme:m,className:m.listItem,id:d,isCollapsed:g,tooltipChildren:n,children:f.jsxs(e,{"aria-labelledby":`flowbite-sidebar-item-${d}`,ref:c,className:Q(m.base,t&&m.active,!g&&h&&((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))}),g&&!s&&f.jsx("span",{className:(x=m.collapsed)==null?void 0:x.noIcon,children:n.charAt(0).toLocaleUpperCase()??"?"}),!g&&f.jsx(Fg,{id:d,theme:m,children:n}),!g&&o&&f.jsx(Th,{color:a,"data-testid":"flowbite-sidebar-label",hidden:g,className:m.label,children:o})]})})});Bg.displayName="Sidebar.Item";const Wg=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=js(),o=re(s.itemGroup,n);return f.jsx("ul",{"data-testid":"flowbite-sidebar-item-group",className:Q(o.base,e),...r,children:f.jsx(fd.Provider,{value:{isInsideCollapse:!1},children:t})})};Wg.displayName="Sidebar.ItemGroup";const zg=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=js(),o=re(s.items,n);return f.jsx("div",{className:Q(o.base,e),"data-testid":"flowbite-sidebar-items",...r,children:t})};zg.displayName="Sidebar.Items";const Hg=({children:t,className:e,href:n,img:r,imgAlt:s="",theme:o={},...a})=>{const i=_.useId(),{theme:l,isCollapsed:c}=js(),d=re(l.logo,o);return f.jsxs("a",{"aria-labelledby":`flowbite-sidebar-logo-${i}`,href:n,className:Q(d.base,e),...a,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})]})};Hg.displayName="Sidebar.Logo";const Vg=({children:t,as:e="nav",collapseBehavior:n="collapse",collapsed:r=!1,theme:s={},className:o,...a})=>{const i=re(pe().sidebar,s);return f.jsx(Ag.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"],o),...a,children:f.jsx("div",{className:i.root.inner,children:t})})})};Vg.displayName="Sidebar",Object.assign(Vg,{Collapse:Lg,CTA:Rg,Item:Bg,Items:zg,ItemGroup:Wg,Logo:Hg});const Yg=_.createContext(void 0);function o_(){const t=_.useContext(Yg);if(!t)throw new Error("useTableBodyContext should be used within the TableBodyContext provider!");return t}const Ug=_.createContext(void 0);function hd(){const t=_.useContext(Ug);if(!t)throw new Error("useTableContext should be used within the TableContext provider!");return t}const Gg=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:o}=hd(),a=re(o.body,n);return f.jsx(Yg.Provider,{value:{theme:a},children:f.jsx("tbody",{className:Q(a.base,e),ref:s,...r,children:t})})});Gg.displayName="Table.Body";const Xg=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:o}=o_(),a=re(o.cell,n);return f.jsx("td",{className:Q(a.base,e),ref:s,...r,children:t})});Xg.displayName="Table.Cell";const Kg=_.createContext(void 0);function a_(){const t=_.useContext(Kg);if(!t)throw new Error("useTableHeadContext should be used within the TableHeadContext provider!");return t}const Zg=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:o}=hd(),a=re(o.head,n);return f.jsx(Kg.Provider,{value:{theme:a},children:f.jsx("thead",{className:Q(a.base,e),ref:s,...r,children:f.jsx("tr",{children:t})})})});Zg.displayName="Table.Head";const Qg=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:o}=a_(),a=re(o.cell,n);return f.jsx("th",{className:Q(a.base,e),ref:s,...r,children:t})});Qg.displayName="Table.HeadCell";const Jg=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:o,hoverable:a,striped:i}=hd(),l=re(o.row,n);return f.jsx("tr",{ref:s,"data-testid":"table-row-element",className:Q(l.base,i&&l.striped,a&&l.hovered,e),...r,children:t})});Jg.displayName="Table.Row";const qg=_.forwardRef(({children:t,className:e,striped:n,hoverable:r,theme:s={},...o},a)=>{const i=re(pe().table,s);return f.jsx("div",{"data-testid":"table-element",className:Q(i.root.wrapper),children:f.jsxs(Ug.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),...o,ref:a,children:t})]})})});qg.displayName="Table";const Je=Object.assign(qg,{Head:Zg,Body:Gg,Row:Jg,Cell:Xg,HeadCell:Qg}),$g=({children:t,className:e})=>f.jsx("div",{className:e,children:t});$g.displayName="Tabs.Item";const em=_.forwardRef(({children:t,className:e,onActiveTabChange:n,style:r="default",theme:s={},...o},a)=>{const i=re(pe().tabs,s),l=_.useId(),c=_.useMemo(()=>_.Children.map(_.Children.toArray(t),({props:v})=>v),[t]),d=_.useRef([]),[u,g]=_.useState(Math.max(0,c.findIndex(v=>v.active))),[h,m]=_.useState(-1),p=v=>{g(v),n&&n(v)},b=({target:v})=>{p(v),m(v)},y=({event:v,target:w})=>{v.key==="ArrowLeft"&&m(Math.max(0,h-1)),v.key==="ArrowRight"&&m(Math.min(c.length-1,h+1)),v.key==="Enter"&&(p(w),m(w))},x=i.tablist.tabitem.styles[r],k=i.tabitemcontainer.styles[r];return _.useEffect(()=>{var v;(v=d.current[h])==null||v.focus()},[h]),_.useImperativeHandle(a,()=>({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),...o,children:c.map((v,w)=>f.jsxs("button",{type:"button","aria-controls":`${l}-tabpanel-${w}`,"aria-selected":w===u,className:Q(i.tablist.tabitem.base,x.base,w===u&&x.active.on,w!==u&&!v.disabled&&x.active.off),disabled:v.disabled,id:`${l}-tab-${w}`,onClick:()=>b({target:w}),onKeyDown:C=>y({event:C,target:w}),ref:C=>d.current[w]=C,role:"tab",tabIndex:w===h?0:-1,style:{zIndex:w===h?2:1},children:[v.icon&&f.jsx(v.icon,{className:i.tablist.tabitem.icon}),v.title]},w))}),f.jsx("div",{className:Q(i.tabitemcontainer.base,k),children:c.map((v,w)=>f.jsx("div",{"aria-labelledby":`${l}-tab-${w}`,className:i.tabpanel,hidden:w!==u,id:`${l}-tabpanel-${w}`,role:"tabpanel",tabIndex:0,children:v.children},w))})]})});em.displayName="Tabs",Object.assign(em,{Item:$g});const i_=_.forwardRef(({className:t,color:e="gray",helperText:n,shadow:r,theme:s={},...o},a)=>{const i=re(pe().textarea,s);return f.jsxs(f.Fragment,{children:[f.jsx("textarea",{ref:a,className:Q(i.base,i.colors[e],i.withShadow[r?"on":"off"],t),...o}),n&&f.jsx(So,{color:e,children:n})]})});i_.displayName="Textarea";const tm=_.createContext(void 0);function gd(){const t=_.useContext(tm);if(!t)throw new Error("useTimelineContentContext should be used within the TimelineContentContext provider!");return t}const nm=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=gd(),o=re(s.body,n);return f.jsx("div",{className:Q(o.base,e),...r,children:t})},rm=_.createContext(void 0);function md(){const t=_.useContext(rm);if(!t)throw new Error("useTimelineContext should be used within the TimelineContext provider!");return t}const sm=_.createContext(void 0);function om(){const t=_.useContext(sm);if(!t)throw new Error("useTimelineItemContext should be used within the TimelineItemContext provider!");return t}const am=({children:t,className:e,theme:n={},...r})=>{const{horizontal:s}=md(),{theme:o}=om(),a=re(o.content,n);return f.jsx(tm.Provider,{value:{theme:a},children:f.jsx("div",{"data-testid":"timeline-content",className:Q(s&&a.root.base,e),...r,children:t})})},im=({children:t,className:e,theme:n={},...r})=>{const{theme:s,horizontal:o}=md(),a=re(s.item,n);return f.jsx(sm.Provider,{value:{theme:a},children:f.jsx("li",{"data-testid":"timeline-item",className:Q(o&&a.root.horizontal,!o&&a.root.vertical,e),...r,children:t})})},lm=({children:t,className:e,icon:n,theme:r={},...s})=>{const{horizontal:o}=md(),{theme:a}=om(),i=re(a.point,r);return f.jsxs("div",{"data-testid":"timeline-point",className:Q(o&&i.horizontal,!o&&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(o&&i.marker.base.horizontal,!o&&i.marker.base.vertical)}),o&&f.jsx("div",{className:Q(i.line)})]})},cm=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=gd(),o=re(s.time,n);return f.jsx("time",{className:Q(o.base,e),...r,children:t})},dm=({as:t="h3",children:e,className:n,theme:r={},...s})=>{const{theme:o}=gd(),a=re(o.title,r);return f.jsx(t,{className:Q(a.base,n),...s,children:e})},um=({children:t,className:e,horizontal:n,theme:r={},...s})=>{const o=re(pe().timeline,r);return f.jsx(rm.Provider,{value:{theme:o,horizontal:n},children:f.jsx("ol",{"data-testid":"timeline-component",className:Q(n&&o.root.direction.horizontal,!n&&o.root.direction.vertical,e),...s,children:t})})};um.displayName="Timeline",im.displayName="Timeline.Item",lm.displayName="Timeline.Point",am.displayName="Timeline.Content",cm.displayName="Timeline.Time",dm.displayName="Timeline.Title",nm.displayName="Timeline.Body",Object.assign(um,{Item:im,Point:lm,Content:am,Time:cm,Title:dm,Body:nm});const fm=_.createContext(void 0);function l_(){const t=_.useContext(fm);if(!t)throw new Error("useToastContext should be used within the ToastContext provider!");return t}const hm=({className:t,onClick:e,theme:n={},xIcon:r=t1,onDismiss:s,...o})=>{const{theme:a,duration:i,isClosed:l,isRemoved:c,setIsClosed:d,setIsRemoved:u}=l_(),g=re(a.toggle,n),h=m=>{if(e&&e(m),s){s();return}d(!l),setTimeout(()=>u(!c),i)};return f.jsx("button",{"aria-label":"Close",onClick:h,type:"button",className:Q(g.base,t),...o,children:f.jsx(r,{"aria-hidden":!0,className:g.icon})})},c_={75:"duration-75",100:"duration-100",150:"duration-150",200:"duration-200",300:"duration-300",500:"duration-500",700:"duration-700",1e3:"duration-1000"},gm=({children:t,className:e,duration:n=300,theme:r={},...s})=>{const[o,a]=_.useState(!1),[i,l]=_.useState(!1),c=re(pe().toast,r);return i?null:f.jsx(fm.Provider,{value:{theme:c,duration:n,isClosed:o,isRemoved:i,setIsClosed:a,setIsRemoved:l},children:f.jsx("div",{"data-testid":"flowbite-toast",role:"alert",className:Q(c.root.base,c_[n],o&&c.root.closed,e),...s,children:t})})};gm.displayName="Toast",hm.displayName="Toast.Toggle",Object.assign(gm,{Toggle:hm});const d_=_.forwardRef(({checked:t,className:e,color:n="blue",sizing:r="md",disabled:s,label:o,name:a,onChange:i,theme:l={},...c},d)=>{const u=_.useId(),g=re(pe().toggleSwitch,l),h=()=>i(!t),m=()=>{h()},p=b=>{b.code=="Enter"&&b.preventDefault()};return f.jsxs(f.Fragment,{children:[a&&t?f.jsx("input",{ref:d,checked:t,hidden:!0,name:a,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(g.root.base,g.root.active[s?"off":"on"],e),...c,children:[f.jsx("div",{"data-testid":"flowbite-toggleswitch-toggle",className:Q(g.toggle.base,g.toggle.checked[t?"on":"off"],t&&g.toggle.checked.color[n],g.toggle.sizes[r])}),o!=null&&o.length?f.jsx("span",{"data-testid":"flowbite-toggleswitch-label",id:`${u}-flowbite-toggleswitch-label`,className:g.root.label,children:o}):null]})]})});d_.displayName="ToggleSwitch";const Is=_.forwardRef(({icon:t,placeholder:e,label:n,error:r,type:s,classInclude:o,maxLength:a,onChange:i,classLabel:l,id:c,...d},u)=>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(xs,{className:`${o}`,sizing:"sm",maxLength:a,ref:u,type:s,rightIcon:()=>f.jsx(sh,{size:17,"aria-label":"search"}),placeholder:e,onChange:i,id:c,...d}):f.jsx(xs,{className:`${o}`,sizing:"sm",maxLength:a,ref:u,type:s,placeholder:e,onChange:i,id:c,...d}),r&&f.jsx("p",{className:"mt-1 text-xs text-red-500",children:r})]}));Is.displayName="InputForm";const u_={"mth-password":"passwordInput-module__mth-password__R6DoN"},pd=({placeholder:t,onChange:e,value:n,...r})=>{const[s,o]=_.useState(!1),a=()=>{o(!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:a,className:u_["mth-password"],children:s?f.jsx(Z3,{}):f.jsx(Q3,{})})]})})},mm={mth_progress_bar:"progressBar-module__mth_progress_bar__q2V2y",mth_progress_bar_thumb:"progressBar-module__mth_progress_bar_thumb__OTDNJ"},pm=({start:t,end:e,current:n,type:r})=>{const s=(n-t)/(e-t)*100,o=Math.min(Math.max(s,0),100),a=()=>o<10?"left-0":o>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:`${o}%`}}),f.jsxs("div",{className:"absolute top-1/2 transform -translate-y-1/2 -translate-x-1/2",style:{left:`${o}%`},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 ${a()}`,children:[n.toLocaleString()," ",r==="percentage"?"%":""]})]})]})]})},bm=_.forwardRef(({options:t,label:e,error:n,value:r,onChange:s,id:o,classDiv:a,...i},l)=>f.jsxs("div",{className:a,children:[f.jsxs("select",{ref:l,id:o,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})]}));bm.displayName="SelectForm";const ym={mth_card_indicator:"card-module__mth_card_indicator__lfgp3"},f_=({logo:t,number:e,title:n,start:r,end:s,current:o,type:a,classIm:i})=>{const l=c=>new Intl.NumberFormat("es-ES",{maximumFractionDigits:2,minimumFractionDigits:0}).format(c);return f.jsxs("div",{className:`${ym.mth_card_indicator} flex flex-col border bg-white p-5`,children:[f.jsx("div",{className:"flex justify-end",children:f.jsx(Ir,{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)," ",a==="percentage"?"%":""]}),f.jsx("div",{className:"mt-2 mth_card_indicator_progress_bar",children:f.jsx(pm,{start:r,end:s,current:o,type:a})})]})};/*!
9
9
  * @kurkle/color v0.3.4
10
10
  * https://github.com/kurkle/color#readme
11
11
  * (c) 2024 Jukka Kurkela
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui-mathilde-web",
3
- "version": "0.13.6",
3
+ "version": "0.13.7",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"