ui-mathilde-web 0.7.0 → 0.7.1

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.
@@ -413,6 +413,7 @@ declare interface SelectFormProps extends React.SelectHTMLAttributes<HTMLSelectE
413
413
  error?: string;
414
414
  id: string;
415
415
  classSelect?: string;
416
+ classDiv?: string;
416
417
  }
417
418
 
418
419
  export declare const SidebarPro: default_2.FC<SidebarProProps>;
@@ -10186,19 +10186,19 @@ const B_ = {
10186
10186
  ] })
10187
10187
  ] });
10188
10188
  }, V_ = Me(
10189
- ({ options: t, label: e, error: n, value: r, onChange: a, id: o, ...i }, s) => /* @__PURE__ */ K("div", { className: "mb-5", children: [
10189
+ ({ options: t, label: e, error: n, value: r, onChange: a, id: o, classDiv: i, ...s }, l) => /* @__PURE__ */ K("div", { className: i, children: [
10190
10190
  /* @__PURE__ */ K(
10191
10191
  "select",
10192
10192
  {
10193
- ref: s,
10193
+ ref: l,
10194
10194
  id: o,
10195
10195
  className: "h-8 w-full rounded-lg border px-3 py-0.5",
10196
10196
  value: r,
10197
10197
  onChange: a,
10198
- ...i,
10198
+ ...s,
10199
10199
  children: [
10200
10200
  /* @__PURE__ */ b("option", { value: "0", children: e || "Seleccione una opción" }),
10201
- t == null ? void 0 : t.map((l) => /* @__PURE__ */ b("option", { value: l.value, children: l.label }, l.value))
10201
+ t == null ? void 0 : t.map((c) => /* @__PURE__ */ b("option", { value: c.value, children: c.label }, c.value))
10202
10202
  ]
10203
10203
  }
10204
10204
  ),
@@ -5,7 +5,7 @@
5
5
  */(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var a="",o=0;o<arguments.length;o++){var i=arguments[o];i&&(a=s(a,r(i)))}return a}function r(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return n.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var o="";for(var i in a)e.call(a,i)&&a[i]&&(o=s(o,i));return o}function s(a,o){return o?a?a+" "+o:a+o:a}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(zf);var er=zf.exports;const zk=Wf(er);var Hl={exports:{}};function Hf(t,e=100,n={}){if(typeof t!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof t}\`.`);if(e<0)throw new RangeError("`wait` must not be negative.");const{immediate:r}=typeof n=="boolean"?{immediate:n}:n;let s,a,o,i,l;function c(){const u=Date.now()-i;if(u<e&&u>=0)o=setTimeout(c,e-u);else if(o=void 0,!r){const f=s,h=a;s=void 0,a=void 0,l=t.apply(f,h)}}const d=function(...u){if(s&&this!==s)throw new Error("Debounced method called with different contexts.");s=this,a=u,i=Date.now();const f=r&&!o;if(o||(o=setTimeout(c,e)),f){const h=s,m=a;s=void 0,a=void 0,l=t.apply(h,m)}return l};return d.clear=()=>{o&&(clearTimeout(o),o=void 0)},d.flush=()=>{if(!o)return;const u=s,f=a;s=void 0,a=void 0,l=t.apply(u,f),clearTimeout(o),o=void 0},d}Hl.exports.debounce=Hf,Hl.exports=Hf;var Hk=Hl.exports;const Yk=Wf(Hk);var Vk=Object.defineProperty,Uk=(t,e,n)=>e in t?Vk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,st=(t,e,n)=>(Uk(t,typeof e!="symbol"?e+"":e,n),n);const Xk=300,Kk=0;class Gk extends _.PureComponent{constructor(e){super(e),st(this,"container"),st(this,"scrolling"),st(this,"started"),st(this,"pressed"),st(this,"isMobile",!1),st(this,"internal"),st(this,"scrollLeft"),st(this,"scrollTop"),st(this,"clientX"),st(this,"clientY"),st(this,"onEndScroll",()=>{this.scrolling=!1,!this.pressed&&this.started&&this.processEnd()}),st(this,"onScroll",()=>{const n=this.container.current;(n.scrollLeft!==this.scrollLeft||n.scrollTop!==this.scrollTop)&&(this.scrolling=!0,this.processScroll(),this.onEndScroll())}),st(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()}}),st(this,"onTouchEnd",()=>{const{nativeMobileScroll:n}=this.props;this.pressed&&(this.started&&(!this.scrolling||!n)?this.processEnd():this.pressed=!1,this.forceUpdate())}),st(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()}}),st(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()))}),st(this,"onMouseMove",n=>{this.pressed&&(this.processMove(n.clientX,n.clientY),n.preventDefault(),this.props.stopPropagation&&n.stopPropagation())}),st(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=Yk(this.onEndScroll,Xk),this.scrolling=!1,this.started=!1,this.pressed=!1,this.internal=!1,this.getRef=this.getRef.bind(this)}componentDidMount(){const{nativeMobileScroll:e}=this.props,n=this.container.current;window.addEventListener("mouseup",this.onMouseUp),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd),n.addEventListener("touchstart",this.onTouchStart,{passive:!1}),n.addEventListener("mousedown",this.onMouseDown,{passive:!1}),e&&(this.isMobile=this.isMobileDevice(),this.isMobile&&this.forceUpdate())}componentWillUnmount(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)}getElement(){return this.container.current}isMobileDevice(){return typeof window.orientation<"u"||navigator.userAgent.indexOf("IEMobile")!==-1}isDraggable(e){const n=this.props.ignoreElements;if(n){const r=e.closest(n);return r===null||r.contains(this.getElement())}else return!0}isScrollable(){const e=this.container.current;return e&&(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight)}processClick(e,n){const r=this.container.current;this.scrollLeft=r==null?void 0:r.scrollLeft,this.scrollTop=r==null?void 0:r.scrollTop,this.clientX=e,this.clientY=n,this.pressed=!0}processStart(e=!0){const{onStartScroll:n}=this.props;this.started=!0,e&&document.body.classList.add("cursor-grab"),n&&n({external:!this.internal}),this.forceUpdate()}processScroll(){if(this.started){const{onScroll:e}=this.props;e&&e({external:!this.internal})}else this.processStart(!1)}processMove(e,n){const{horizontal:r,vertical:s,activationDistance:a,onScroll:o}=this.props,i=this.container.current;this.started?(r&&(i.scrollLeft-=e-this.clientX),s&&(i.scrollTop-=n-this.clientY),o&&o({external:!this.internal}),this.clientX=e,this.clientY=n,this.scrollLeft=i.scrollLeft,this.scrollTop=i.scrollTop):(r&&Math.abs(e-this.clientX)>a||s&&Math.abs(n-this.clientY)>a)&&(this.clientX=e,this.clientY=n,this.processStart())}processEnd(){const{onEndScroll:e}=this.props;this.container.current&&e&&e({external:!this.internal}),this.pressed=!1,this.started=!1,this.scrolling=!1,this.internal=!1,document.body.classList.remove("cursor-grab"),this.forceUpdate()}getRef(e){[this.container,this.props.innerRef].forEach(n=>{n&&(typeof n=="function"?n(e):n.current=e)})}render(){const{children:e,draggingClassName:n,className:r,style:s,hideScrollbars:a}=this.props;return g.jsx("div",{className:zk(r,this.pressed&&n,{"!scroll-auto [&>*]:pointer-events-none [&>*]:cursor-grab":this.pressed,"overflow-auto":this.isMobile,"overflow-hidden !overflow-x-hidden [overflow:-moz-scrollbars-none] [scrollbar-width:none]":a,"[&::-webkit-scrollbar]:[-webkit-appearance:none !important] [&::-webkit-scrollbar]:!hidden [&::-webkit-scrollbar]:!h-0 [&::-webkit-scrollbar]:!w-0 [&::-webkit-scrollbar]:!bg-transparent":a}),style:s,ref:this.getRef,onScroll:this.onScroll,children:e})}}st(Gk,"defaultProps",{nativeMobileScroll:!0,hideScrollbars:!0,activationDistance:10,vertical:!0,horizontal:!0,stopPropagation:!1,style:{},buttons:[Kk]});const Yl=_.forwardRef(({className:t,color:e="default",theme:n={},...r},s)=>{const a=te(fe().checkbox,n);return g.jsx("input",{ref:s,type:"checkbox",className:X(a.root.base,a.root.color[e],t),...r})});Yl.displayName="Checkbox";const Js=({children:t,className:e,color:n="default",theme:r={},value:s,...a})=>{const o=te(fe().helperText,r);return g.jsx("p",{className:X(o.root.base,o.root.colors[n],e),...a,children:s??t??""})};Js.displayName="HelperText";const qs=_.forwardRef(({addon:t,className:e,color:n="gray",helperText:r,icon:s,rightIcon:a,shadow:o,sizing:i="md",theme:l={},type:c="text",...d},u)=>{const f=te(fe().textInput,l);return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:X(f.base,e),children:[t&&g.jsx("span",{className:f.addon,children:t}),g.jsxs("div",{className:f.field.base,children:[s&&g.jsx("div",{className:f.field.icon.base,children:g.jsx(s,{className:f.field.icon.svg})}),a&&g.jsx("div",{"data-testid":"right-icon",className:f.field.rightIcon.base,children:g.jsx(a,{className:f.field.rightIcon.svg})}),g.jsx("input",{className:X(f.field.input.base,f.field.input.colors[n],f.field.input.sizes[i],f.field.input.withIcon[s?"on":"off"],f.field.input.withRightIcon[a?"on":"off"],f.field.input.withAddon[t?"on":"off"],f.field.input.withShadow[o?"on":"off"]),type:c,...d,ref:u})]})]}),r&&g.jsx(Js,{color:n,children:r})]})});qs.displayName="TextInput";const Yf=_.createContext(void 0);function mo(){const t=_.useContext(Yf);if(!t)throw new Error("useDatePickerContext should be used within the DatePickerContext provider!");return t}var Be=(t=>(t[t.Days=0]="Days",t[t.Months=1]="Months",t[t.Years=2]="Years",t[t.Decades=3]="Decades",t))(Be||{}),Vf=(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))(Vf||{});const $s=(t,e,n)=>{const r=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();if(e&&n){const s=new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime(),a=new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime();return r>=s&&r<=a}if(e){const s=new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();return r>=s}if(n){const s=new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime();return r<=s}return!0},po=(t,e)=>(t=new Date(t.getFullYear(),t.getMonth(),t.getDate()),e=new Date(e.getFullYear(),e.getMonth(),e.getDate()),t.getTime()===e.getTime()),Qk=(t,e,n)=>($s(t,e,n)||(e&&t<e?t=e:n&&t>n&&(t=n)),t),Zk=(t,e)=>{const n=new Date(t.getFullYear(),t.getMonth(),1);let s=n.getDay()-e;return s<0&&(s+=7),Vl(n,-s)},Jk=(t,e)=>{const n=[],r=new Date(0);r.setDate(r.getDate()-r.getDay()+e);const s=new Intl.DateTimeFormat(t,{weekday:"short"});for(let a=0;a<7;a++)n.push(s.format(Vl(r,a)));return n},Vl=(t,e)=>{const n=new Date(t);return n.setDate(n.getDate()+e),n},qk=(t,e)=>{const n=new Date(t);return n.setMonth(n.getMonth()+e),n},os=(t,e)=>{const n=new Date(t);return n.setFullYear(n.getFullYear()+e),n},ea=(t,e,n)=>{let r={day:"numeric",month:"long",year:"numeric"};return n&&(r=n),new Intl.DateTimeFormat(t,r).format(e)},is=(t,e)=>{const n=t.getFullYear();return Math.floor(n/e)*e},$k=(t,e)=>{const n=t.getFullYear(),r=e+9;return n>=e&&n<=r},e2=({theme:t={}})=>{const{theme:e,weekStart:n,minDate:r,maxDate:s,viewDate:a,selectedDate:o,changeSelectedDate:i,language:l}=mo(),c=te(e.views.days,t),d=Jk(l,n),u=Zk(a,n);return g.jsxs(g.Fragment,{children:[g.jsx("div",{className:c.header.base,children:d.map((f,h)=>g.jsx("span",{className:c.header.title,children:f},h))}),g.jsx("div",{className:c.items.base,children:[...Array(42)].map((f,h)=>{const m=Vl(u,h),p=ea(l,m,{day:"numeric"}),b=po(o,m),v=!$s(m,r,s);return g.jsx("button",{disabled:v,type:"button",className:X(c.items.item.base,b&&c.items.item.selected,v&&c.items.item.disabled),onClick:()=>{v||i(m,!0)},children:p},h)})})]})},t2=({theme:t={}})=>{const{theme:e,selectedDate:n,viewDate:r,setViewDate:s,setView:a}=mo(),o=te(e.views.decades,t);return g.jsx("div",{className:o.items.base,children:[...Array(12)].map((i,l)=>{const d=is(r,100)-10+l*10,u=new Date(d,0,1),f=os(u,9),h=$k(r,d),m=!$s(r,u,f);return g.jsx("button",{disabled:m,type:"button",className:X(o.items.item.base,h&&o.items.item.selected,m&&o.items.item.disabled),onClick:()=>{m||(s(os(r,d-n.getFullYear())),a(Be.Years))},children:d},l)})})},n2=({theme:t={}})=>{const{theme:e,minDate:n,maxDate:r,selectedDate:s,viewDate:a,language:o,setViewDate:i,setView:l}=mo(),c=te(e.views.months,t);return g.jsx("div",{className:c.items.base,children:[...Array(12)].map((d,u)=>{const f=new Date(a.getTime());f.setMonth(u);const h=ea(o,f,{month:"short"}),m=po(s,f),p=!$s(f,n,r);return g.jsx("button",{disabled:p,type:"button",className:X(c.items.item.base,m&&c.items.item.selected,p&&c.items.item.disabled),onClick:()=>{p||(i(f),l(Be.Days))},children:h},u)})})},r2=({theme:t={}})=>{const{theme:e,selectedDate:n,minDate:r,maxDate:s,viewDate:a,setViewDate:o,setView:i}=mo(),l=te(e.views.years,t);return g.jsx("div",{className:l.items.base,children:[...Array(12)].map((c,d)=>{const f=is(a,10)-1+d*1,h=new Date(a.getTime());h.setFullYear(f);const m=po(n,h),p=!$s(h,r,s);return g.jsx("button",{disabled:p,type:"button",className:X(l.items.item.base,m&&l.items.item.selected,p&&l.items.item.disabled),onClick:()=>{p||(o(h),i(Be.Months))},children:f},d)})})},s2=({title:t,open:e,inline:n=!1,autoHide:r=!0,showClearButton:s=!0,labelClearButton:a="Clear",showTodayButton:o=!0,labelTodayButton:i="Today",defaultDate:l=new Date,minDate:c,maxDate:d,language:u="en",weekStart:f=Vf.Sunday,className:h,theme:m={},onSelectedDateChanged:p,...b},v)=>{const x=te(fe().datepicker,m);l=Qk(l,c,d);const[k,w]=_.useState(e),[y,S]=_.useState(Be.Days),[N,M]=_.useState(l),[T,E]=_.useState(l),z=_.useRef(null),L=_.useRef(null),O=($,j)=>{M($),p&&p($),r&&y===Be.Days&&j==!0&&!n&&w(!1)},C=()=>{O(l,!0),l&&E(l)};_.useImperativeHandle(v,()=>({focus(){var $;($=z.current)==null||$.focus()},clear(){C()}}));const P=$=>{switch($){case Be.Decades:return g.jsx(t2,{theme:x.views.decades});case Be.Years:return g.jsx(r2,{theme:x.views.years});case Be.Months:return g.jsx(n2,{theme:x.views.months});case Be.Days:default:return g.jsx(e2,{theme:x.views.days})}},F=()=>{switch(y){case Be.Days:return Be.Months;case Be.Months:return Be.Years;case Be.Years:return Be.Decades}return y},U=()=>{switch(y){case Be.Decades:return`${is(T,100)} - ${is(T,100)+90}`;case Be.Years:return`${is(T,10)} - ${is(T,10)+9}`;case Be.Months:return ea(u,T,{year:"numeric"});case Be.Days:default:return ea(u,T,{month:"long",year:"numeric"})}},Q=($,j,H)=>{switch($){case Be.Days:return new Date(qk(j,H));case Be.Months:return new Date(os(j,H));case Be.Years:return new Date(os(j,H*10));case Be.Decades:return new Date(os(j,H*100));default:return new Date(os(j,H*10))}};return _.useEffect(()=>{const $=j=>{var A,I;const H=(A=L==null?void 0:L.current)==null?void 0:A.contains(j.target),R=(I=z==null?void 0:z.current)==null?void 0:I.contains(j.target);!H&&!R&&w(!1)};return document.addEventListener("mousedown",$),()=>{document.removeEventListener("mousedown",$)}},[z,L,w]),g.jsx(Yf.Provider,{value:{theme:x,language:u,minDate:c,maxDate:d,weekStart:f,isOpen:k,setIsOpen:w,view:y,setView:S,viewDate:T,setViewDate:E,selectedDate:N,setSelectedDate:M,changeSelectedDate:O},children:g.jsxs("div",{className:X(x.root.base,h),children:[!n&&g.jsx(qs,{theme:x.root.input,icon:ux,ref:z,onFocus:()=>{po(T,N)||E(N),w(!0)},value:N&&ea(u,N),readOnly:!0,...b}),(k||n)&&g.jsx("div",{ref:L,className:X(x.popup.root.base,n&&x.popup.root.inline),children:g.jsxs("div",{className:x.popup.root.inner,children:[g.jsxs("div",{className:x.popup.header.base,children:[t&&g.jsx("div",{className:x.popup.header.title,children:t}),g.jsxs("div",{className:x.popup.header.selectors.base,children:[g.jsx("button",{type:"button",className:X(x.popup.header.selectors.button.base,x.popup.header.selectors.button.prev),onClick:()=>E(Q(y,T,-1)),children:g.jsx(cx,{})}),g.jsx("button",{type:"button",className:X(x.popup.header.selectors.button.base,x.popup.header.selectors.button.view),onClick:()=>S(F()),children:U()}),g.jsx("button",{type:"button",className:X(x.popup.header.selectors.button.base,x.popup.header.selectors.button.next),onClick:()=>E(Q(y,T,1)),children:g.jsx(dx,{})})]})]}),g.jsx("div",{className:x.popup.view.base,children:P(y)}),(s||o)&&g.jsxs("div",{className:x.popup.footer.base,children:[o&&g.jsx("button",{type:"button",className:X(x.popup.footer.button.base,x.popup.footer.button.today),onClick:()=>{const $=new Date;O($,!0),E($)},children:i}),s&&g.jsx("button",{type:"button",className:X(x.popup.footer.button.base,x.popup.footer.button.clear),onClick:()=>{O(l,!0),l&&E(l)},children:a})]})]})})]})})},Uf=_.forwardRef(s2);Uf.displayName="Datepicker";function bo(){return typeof window<"u"}function Sr(t){return Xf(t)?(t.nodeName||"").toLowerCase():"#document"}function Ct(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function dn(t){var e;return(e=(Xf(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Xf(t){return bo()?t instanceof Node||t instanceof Ct(t).Node:!1}function Ee(t){return bo()?t instanceof Element||t instanceof Ct(t).Element:!1}function ut(t){return bo()?t instanceof HTMLElement||t instanceof Ct(t).HTMLElement:!1}function Ul(t){return!bo()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ct(t).ShadowRoot}function ta(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=Gt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(s)}function a2(t){return["table","td","th"].includes(Sr(t))}function yo(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Xl(t){const e=Kl(),n=Ee(t)?Gt(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 o2(t){let e=In(t);for(;ut(e)&&!tr(e);){if(Xl(e))return e;if(yo(e))return null;e=In(e)}return null}function Kl(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function tr(t){return["html","body","#document"].includes(Sr(t))}function Gt(t){return Ct(t).getComputedStyle(t)}function wo(t){return Ee(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function In(t){if(Sr(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ul(t)&&t.host||dn(t);return Ul(e)?e.host:e}function Kf(t){const e=In(t);return tr(e)?t.ownerDocument?t.ownerDocument.body:t.body:ut(e)&&ta(e)?e:Kf(e)}function nr(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=Kf(t),a=s===((r=t.ownerDocument)==null?void 0:r.body),o=Ct(s);if(a){const i=Gl(o);return e.concat(o,o.visualViewport||[],ta(s)?s:[],i&&n?nr(i):[])}return e.concat(s,nr(s,[],n))}function Gl(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function un(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 $e(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&Ul(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function Ql(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function Gf(){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 Qf(t){return t.mozInputSource===0&&t.isTrusted?!0:ql()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function Zl(t){return i2()?!1:!ql()&&t.width===0&&t.height===0||ql()&&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 Jl(){return/apple/i.test(navigator.vendor)}function ql(){const t=/android/i;return t.test(Ql())||t.test(Gf())}function Zf(){return Ql().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function i2(){return Gf().includes("jsdom/")}function vo(t,e){const n=["mouse","pen"];return e||n.push("",void 0),n.includes(t)}function l2(t){return"nativeEvent"in t}function c2(t){return t.matches("html,body")}function xt(t){return(t==null?void 0:t.ownerDocument)||document}function $l(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 rr(t){return"composedPath"in t?t.composedPath()[0]:t.target}const d2="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function ec(t){return ut(t)&&t.matches(d2)}function ft(t){t.preventDefault(),t.stopPropagation()}function Jf(t){return t?t.getAttribute("role")==="combobox"&&ec(t):!1}const u2=["top","right","bottom","left"],qf=["start","end"],$f=u2.reduce((t,e)=>t.concat(e,e+"-"+qf[0],e+"-"+qf[1]),[]),ls=Math.min,Or=Math.max,xo=Math.round,cs=Math.floor,fn=t=>({x:t,y:t}),f2={left:"right",right:"left",bottom:"top",top:"bottom"},h2={start:"end",end:"start"};function tc(t,e,n){return Or(t,ls(e,n))}function ds(t,e){return typeof t=="function"?t(e):t}function An(t){return t.split("-")[0]}function hn(t){return t.split("-")[1]}function eh(t){return t==="x"?"y":"x"}function nc(t){return t==="y"?"height":"width"}function ko(t){return["top","bottom"].includes(An(t))?"y":"x"}function rc(t){return eh(ko(t))}function th(t,e,n){n===void 0&&(n=!1);const r=hn(t),s=rc(t),a=nc(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(o=So(o)),[o,So(o)]}function g2(t){const e=So(t);return[_o(t),e,_o(e)]}function _o(t){return t.replace(/start|end/g,e=>h2[e])}function m2(t,e,n){const r=["left","right"],s=["right","left"],a=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?s:r:e?r:s;case"left":case"right":return e?a:o;default:return[]}}function p2(t,e,n,r){const s=hn(t);let a=m2(An(t),n==="start",r);return s&&(a=a.map(o=>o+"-"+s),e&&(a=a.concat(a.map(_o)))),a}function So(t){return t.replace(/left|right|bottom|top/g,e=>f2[e])}function b2(t){return{top:0,right:0,bottom:0,left:0,...t}}function nh(t){return typeof t!="number"?b2(t):{top:t,right:t,bottom:t,left:t}}function Oo(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 rh(t,e,n){let{reference:r,floating:s}=t;const a=ko(e),o=rc(e),i=nc(o),l=An(e),c=a==="y",d=r.x+r.width/2-s.width/2,u=r.y+r.height/2-s.height/2,f=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(hn(e)){case"start":h[o]-=f*(n&&c?-1:1);break;case"end":h[o]+=f*(n&&c?-1:1);break}return h}const y2=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:o}=n,i=a.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:d,y:u}=rh(c,r,l),f=r,h={},m=0;for(let p=0;p<i.length;p++){const{name:b,fn:v}=i[p],{x,y:k,data:w,reset:y}=await v({x:d,y:u,initialPlacement:r,placement:f,strategy:s,middlewareData:h,rects:c,platform:o,elements:{reference:t,floating:e}});d=x??d,u=k??u,h={...h,[b]:{...h[b],...w}},y&&m<=50&&(m++,typeof y=="object"&&(y.placement&&(f=y.placement),y.rects&&(c=y.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:s}):y.rects),{x:d,y:u}=rh(c,f,l)),p=-1)}return{x:d,y:u,placement:f,strategy:s,middlewareData:h}};async function sc(t,e){var n;e===void 0&&(e={});const{x:r,y:s,platform:a,rects:o,elements:i,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:h=0}=ds(e,t),m=nh(h),b=i[f?u==="floating"?"reference":"floating":u],v=Oo(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(b)))==null||n?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:c,rootBoundary:d,strategy:l})),x=u==="floating"?{...o.floating,x:r,y:s}:o.reference,k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),w=await(a.isElement==null?void 0:a.isElement(k))?await(a.getScale==null?void 0:a.getScale(k))||{x:1,y:1}:{x:1,y:1},y=Oo(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:x,offsetParent:k,strategy:l}):x);return{top:(v.top-y.top+m.top)/w.y,bottom:(y.bottom-v.bottom+m.bottom)/w.y,left:(v.left-y.left+m.left)/w.x,right:(y.right-v.right+m.right)/w.x}}const w2=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:a,platform:o,elements:i,middlewareData:l}=e,{element:c,padding:d=0}=ds(t,e)||{};if(c==null)return{};const u=nh(d),f={x:n,y:r},h=rc(s),m=nc(h),p=await o.getDimensions(c),b=h==="y",v=b?"top":"left",x=b?"bottom":"right",k=b?"clientHeight":"clientWidth",w=a.reference[m]+a.reference[h]-f[h]-a.floating[m],y=f[h]-a.reference[h],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let N=S?S[k]:0;(!N||!await(o.isElement==null?void 0:o.isElement(S)))&&(N=i.floating[k]||a.floating[m]);const M=w/2-y/2,T=N/2-p[m]/2-1,E=ls(u[v],T),z=ls(u[x],T),L=E,O=N-p[m]-z,C=N/2-p[m]/2+M,P=tc(L,C,O),F=!l.arrow&&hn(s)!=null&&C!==P&&a.reference[m]/2-(C<L?E:z)-p[m]/2<0,U=F?C<L?C-L:C-O:0;return{[h]:f[h]+U,data:{[h]:P,centerOffset:C-P-U,...F&&{alignmentOffset:U}},reset:F}}});function v2(t,e,n){return(t?[...n.filter(s=>hn(s)===t),...n.filter(s=>hn(s)!==t)]:n.filter(s=>An(s)===s)).filter(s=>t?hn(s)===t||(e?_o(s)!==s:!1):!0)}const x2=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,r,s;const{rects:a,middlewareData:o,placement:i,platform:l,elements:c}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:f=$f,autoAlignment:h=!0,...m}=ds(t,e),p=u!==void 0||f===$f?v2(u||null,h,f):f,b=await sc(e,m),v=((n=o.autoPlacement)==null?void 0:n.index)||0,x=p[v];if(x==null)return{};const k=th(x,a,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(i!==x)return{reset:{placement:p[0]}};const w=[b[An(x)],b[k[0]],b[k[1]]],y=[...((r=o.autoPlacement)==null?void 0:r.overflows)||[],{placement:x,overflows:w}],S=p[v+1];if(S)return{data:{index:v+1,overflows:y},reset:{placement:S}};const N=y.map(E=>{const z=hn(E.placement);return[E.placement,z&&d?E.overflows.slice(0,2).reduce((L,O)=>L+O,0):E.overflows[0],E.overflows]}).sort((E,z)=>E[1]-z[1]),T=((s=N.filter(E=>E[2].slice(0,hn(E[0])?2:3).every(z=>z<=0))[0])==null?void 0:s[0])||N[0][0];return T!==i?{data:{index:v+1,overflows:y},reset:{placement:T}}:{}}}},k2=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:s,middlewareData:a,rects:o,initialPlacement:i,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...b}=ds(t,e);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const v=An(s),x=An(i)===i,k=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=f||(x||!p?[So(i)]:g2(i));!f&&m!=="none"&&w.push(...p2(i,p,m,k));const y=[i,...w],S=await sc(e,b),N=[];let M=((r=a.flip)==null?void 0:r.overflows)||[];if(d&&N.push(S[v]),u){const L=th(s,o,k);N.push(S[L[0]],S[L[1]])}if(M=[...M,{placement:s,overflows:N}],!N.every(L=>L<=0)){var T,E;const L=(((T=a.flip)==null?void 0:T.index)||0)+1,O=y[L];if(O)return{data:{index:L,overflows:M},reset:{placement:O}};let C=(E=M.filter(P=>P.overflows[0]<=0).sort((P,F)=>P.overflows[1]-F.overflows[1])[0])==null?void 0:E.placement;if(!C)switch(h){case"bestFit":{var z;const P=(z=M.map(F=>[F.placement,F.overflows.filter(U=>U>0).reduce((U,Q)=>U+Q,0)]).sort((F,U)=>F[1]-U[1])[0])==null?void 0:z[0];P&&(C=P);break}case"initialPlacement":C=i;break}if(s!==C)return{reset:{placement:C}}}return{}}}};async function _2(t,e){const{placement:n,platform:r,elements:s}=t,a=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=An(n),i=hn(n),l=ko(n)==="y",c=["left","top"].includes(o)?-1:1,d=a&&l?-1:1,u=ds(e,t);let{mainAxis:f,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:f*c}:{x:f*c,y:h*d}}const S2=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:a,placement:o,middlewareData:i}=e,l=await _2(e,t);return o===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:a+l.y,data:{...l,placement:o}}}}},O2=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s}=e,{mainAxis:a=!0,crossAxis:o=!1,limiter:i={fn:b=>{let{x:v,y:x}=b;return{x:v,y:x}}},...l}=ds(t,e),c={x:n,y:r},d=await sc(e,l),u=ko(An(s)),f=eh(u);let h=c[f],m=c[u];if(a){const b=f==="y"?"top":"left",v=f==="y"?"bottom":"right",x=h+d[b],k=h-d[v];h=tc(x,h,k)}if(o){const b=u==="y"?"top":"left",v=u==="y"?"bottom":"right",x=m+d[b],k=m-d[v];m=tc(x,m,k)}const p=i.fn({...e,[f]:h,[u]:m});return{...p,data:{x:p.x-n,y:p.y-r}}}}};function sh(t){const e=Gt(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=ut(t),a=s?t.offsetWidth:n,o=s?t.offsetHeight:r,i=xo(n)!==a||xo(r)!==o;return i&&(n=a,r=o),{width:n,height:r,$:i}}function ac(t){return Ee(t)?t:t.contextElement}function us(t){const e=ac(t);if(!ut(e))return fn(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:a}=sh(e);let o=(a?xo(n.width):n.width)/r,i=(a?xo(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!i||!Number.isFinite(i))&&(i=1),{x:o,y:i}}const C2=fn(0);function ah(t){const e=Ct(t);return!Kl()||!e.visualViewport?C2:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function D2(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Ct(t)?!1:e}function Cr(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),a=ac(t);let o=fn(1);e&&(r?Ee(r)&&(o=us(r)):o=us(t));const i=D2(a,n,r)?ah(a):fn(0);let l=(s.left+i.x)/o.x,c=(s.top+i.y)/o.y,d=s.width/o.x,u=s.height/o.y;if(a){const f=Ct(a),h=r&&Ee(r)?Ct(r):r;let m=f,p=Gl(m);for(;p&&r&&h!==m;){const b=us(p),v=p.getBoundingClientRect(),x=Gt(p),k=v.left+(p.clientLeft+parseFloat(x.paddingLeft))*b.x,w=v.top+(p.clientTop+parseFloat(x.paddingTop))*b.y;l*=b.x,c*=b.y,d*=b.x,u*=b.y,l+=k,c+=w,m=Ct(p),p=Gl(m)}}return Oo({width:d,height:u,x:l,y:c})}function oc(t,e){const n=wo(t).scrollLeft;return e?e.left+n:Cr(dn(t)).left+n}function oh(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=r.left+e.scrollLeft-(n?0:oc(t,r)),a=r.top+e.scrollTop;return{x:s,y:a}}function M2(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const a=s==="fixed",o=dn(r),i=e?yo(e.floating):!1;if(r===o||i&&a)return n;let l={scrollLeft:0,scrollTop:0},c=fn(1);const d=fn(0),u=ut(r);if((u||!u&&!a)&&((Sr(r)!=="body"||ta(o))&&(l=wo(r)),ut(r))){const h=Cr(r);c=us(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}const f=o&&!u&&!a?oh(o,l,!0):fn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:n.y*c.y-l.scrollTop*c.y+d.y+f.y}}function E2(t){return Array.from(t.getClientRects())}function P2(t){const e=dn(t),n=wo(t),r=t.ownerDocument.body,s=Or(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),a=Or(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+oc(t);const i=-n.scrollTop;return Gt(r).direction==="rtl"&&(o+=Or(e.clientWidth,r.clientWidth)-s),{width:s,height:a,x:o,y:i}}function T2(t,e){const n=Ct(t),r=dn(t),s=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,i=0,l=0;if(s){a=s.width,o=s.height;const c=Kl();(!c||c&&e==="fixed")&&(i=s.offsetLeft,l=s.offsetTop)}return{width:a,height:o,x:i,y:l}}function N2(t,e){const n=Cr(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,a=ut(t)?us(t):fn(1),o=t.clientWidth*a.x,i=t.clientHeight*a.y,l=s*a.x,c=r*a.y;return{width:o,height:i,x:l,y:c}}function ih(t,e,n){let r;if(e==="viewport")r=T2(t,n);else if(e==="document")r=P2(dn(t));else if(Ee(e))r=N2(e,n);else{const s=ah(t);r={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return Oo(r)}function lh(t,e){const n=In(t);return n===e||!Ee(n)||tr(n)?!1:Gt(n).position==="fixed"||lh(n,e)}function j2(t,e){const n=e.get(t);if(n)return n;let r=nr(t,[],!1).filter(i=>Ee(i)&&Sr(i)!=="body"),s=null;const a=Gt(t).position==="fixed";let o=a?In(t):t;for(;Ee(o)&&!tr(o);){const i=Gt(o),l=Xl(o);!l&&i.position==="fixed"&&(s=null),(a?!l&&!s:!l&&i.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||ta(o)&&!l&&lh(t,o))?r=r.filter(d=>d!==o):s=i,o=In(o)}return e.set(t,r),r}function I2(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const o=[...n==="clippingAncestors"?yo(e)?[]:j2(e,this._c):[].concat(n),r],i=o[0],l=o.reduce((c,d)=>{const u=ih(e,d,s);return c.top=Or(u.top,c.top),c.right=ls(u.right,c.right),c.bottom=ls(u.bottom,c.bottom),c.left=Or(u.left,c.left),c},ih(e,i,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function A2(t){const{width:e,height:n}=sh(t);return{width:e,height:n}}function R2(t,e,n){const r=ut(e),s=dn(e),a=n==="fixed",o=Cr(t,!0,a,e);let i={scrollLeft:0,scrollTop:0};const l=fn(0);if(r||!r&&!a)if((Sr(e)!=="body"||ta(s))&&(i=wo(e)),r){const f=Cr(e,!0,a,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else s&&(l.x=oc(s));const c=s&&!r&&!a?oh(s,i):fn(0),d=o.left+i.scrollLeft-l.x-c.x,u=o.top+i.scrollTop-l.y-c.y;return{x:d,y:u,width:o.width,height:o.height}}function ic(t){return Gt(t).position==="static"}function ch(t,e){if(!ut(t)||Gt(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return dn(t)===n&&(n=n.ownerDocument.body),n}function dh(t,e){const n=Ct(t);if(yo(t))return n;if(!ut(t)){let s=In(t);for(;s&&!tr(s);){if(Ee(s)&&!ic(s))return s;s=In(s)}return n}let r=ch(t,e);for(;r&&a2(r)&&ic(r);)r=ch(r,e);return r&&tr(r)&&ic(r)&&!Xl(r)?n:r||o2(t)||n}const L2=async function(t){const e=this.getOffsetParent||dh,n=this.getDimensions,r=await n(t.floating);return{reference:R2(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function F2(t){return Gt(t).direction==="rtl"}const W2={convertOffsetParentRelativeRectToViewportRelativeRect:M2,getDocumentElement:dn,getClippingRect:I2,getOffsetParent:dh,getElementRects:L2,getClientRects:E2,getDimensions:A2,getScale:us,isElement:Ee,isRTL:F2};function uh(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function B2(t,e){let n=null,r;const s=dn(t);function a(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function o(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const c=t.getBoundingClientRect(),{left:d,top:u,width:f,height:h}=c;if(i||e(),!f||!h)return;const m=cs(u),p=cs(s.clientWidth-(d+f)),b=cs(s.clientHeight-(u+h)),v=cs(d),k={rootMargin:-m+"px "+-p+"px "+-b+"px "+-v+"px",threshold:Or(0,ls(1,l))||1};let w=!0;function y(S){const N=S[0].intersectionRatio;if(N!==l){if(!w)return o();N?o(!1,N):r=setTimeout(()=>{o(!1,1e-7)},1e3)}N===1&&!uh(c,t.getBoundingClientRect())&&o(),w=!1}try{n=new IntersectionObserver(y,{...k,root:s.ownerDocument})}catch{n=new IntersectionObserver(y,k)}n.observe(t)}return o(!0),a}function fh(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=ac(t),d=s||a?[...c?nr(c):[],...nr(e)]:[];d.forEach(v=>{s&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const u=c&&i?B2(c,n):null;let f=-1,h=null;o&&(h=new ResizeObserver(v=>{let[x]=v;x&&x.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var k;(k=h)==null||k.observe(e)})),n()}),c&&!l&&h.observe(c),h.observe(e));let m,p=l?Cr(t):null;l&&b();function b(){const v=Cr(t);p&&!uh(p,v)&&n(),p=v,m=requestAnimationFrame(b)}return n(),()=>{var v;d.forEach(x=>{s&&x.removeEventListener("scroll",n),a&&x.removeEventListener("resize",n)}),u==null||u(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const z2=S2,H2=x2,Y2=O2,V2=k2,hh=w2,U2=(t,e,n)=>{const r=new Map,s={platform:W2,...n},a={...s.platform,_c:r};return y2(t,e,{...s,platform:a})};var Co=typeof document<"u"?_.useLayoutEffect:_.useEffect;function Do(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(!Do(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const a=s[r];if(!(a==="_owner"&&t.$$typeof)&&!Do(t[a],e[a]))return!1}return!0}return t!==t&&e!==e}function gh(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function mh(t,e){const n=gh(t);return Math.round(e*n)/n}function lc(t){const e=B.useRef(t);return Co(()=>{e.current=t}),e}function X2(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:a,floating:o}={},transform:i=!0,whileElementsMounted:l,open:c}=t,[d,u]=B.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[f,h]=B.useState(r);Do(f,r)||h(r);const[m,p]=B.useState(null),[b,v]=B.useState(null),x=B.useCallback(Q=>{Q!==S.current&&(S.current=Q,p(Q))},[]),k=B.useCallback(Q=>{Q!==N.current&&(N.current=Q,v(Q))},[]),w=a||m,y=o||b,S=B.useRef(null),N=B.useRef(null),M=B.useRef(d),T=l!=null,E=lc(l),z=lc(s),L=lc(c),O=B.useCallback(()=>{if(!S.current||!N.current)return;const Q={placement:e,strategy:n,middleware:f};z.current&&(Q.platform=z.current),U2(S.current,N.current,Q).then($=>{const j={...$,isPositioned:L.current!==!1};C.current&&!Do(M.current,j)&&(M.current=j,Qv.flushSync(()=>{u(j)}))})},[f,e,n,z,L]);Co(()=>{c===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,u(Q=>({...Q,isPositioned:!1})))},[c]);const C=B.useRef(!1);Co(()=>(C.current=!0,()=>{C.current=!1}),[]),Co(()=>{if(w&&(S.current=w),y&&(N.current=y),w&&y){if(E.current)return E.current(w,y,O);O()}},[w,y,O,E,T]);const P=B.useMemo(()=>({reference:S,floating:N,setReference:x,setFloating:k}),[x,k]),F=B.useMemo(()=>({reference:w,floating:y}),[w,y]),U=B.useMemo(()=>{const Q={position:n,left:0,top:0};if(!F.floating)return Q;const $=mh(F.floating,d.x),j=mh(F.floating,d.y);return i?{...Q,transform:"translate("+$+"px, "+j+"px)",...gh(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:j}},[n,i,F.floating,d.x,d.y]);return B.useMemo(()=>({...d,update:O,refs:P,elements:F,floatingStyles:U}),[d,O,P,F,U])}const K2=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?hh({element:r.current,padding:s}).fn(n):{}:r?hh({element:r,padding:s}).fn(n):{}}}},G2=(t,e)=>({...z2(t),options:[t,e]}),Q2=(t,e)=>({...Y2(t),options:[t,e]}),Z2=(t,e)=>({...V2(t),options:[t,e]}),J2=(t,e)=>({...H2(t),options:[t,e]}),q2=(t,e)=>({...K2(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 $2=["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])"],Mo=$2.join(","),ph=typeof Element>"u",fs=ph?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Eo=!ph&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},Po=function t(e,n){var r;n===void 0&&(n=!0);var s=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),a=s===""||s==="true",o=a||n&&e&&t(e.parentNode);return o},e1=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},t1=function(e,n,r){if(Po(e))return[];var s=Array.prototype.slice.apply(e.querySelectorAll(Mo));return n&&fs.call(e,Mo)&&s.unshift(e),s=s.filter(r),s},n1=function t(e,n,r){for(var s=[],a=Array.from(e);a.length;){var o=a.shift();if(!Po(o,!1))if(o.tagName==="SLOT"){var i=o.assignedElements(),l=i.length?i:o.children,c=t(l,!0,r);r.flatten?s.push.apply(s,c):s.push({scopeParent:o,candidates:c})}else{var d=fs.call(o,Mo);d&&r.filter(o)&&(n||!e.includes(o))&&s.push(o);var u=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),f=!Po(u,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(u&&f){var h=t(u===!0?o.children:u.children,!0,r);r.flatten?s.push.apply(s,h):s.push({scopeParent:o,candidates:h})}else a.unshift.apply(a,o.children)}}return s},bh=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},yh=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e1(e))&&!bh(e)?0:e.tabIndex},r1=function(e,n){var r=yh(e);return r<0&&n&&!bh(e)?0:r},s1=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},wh=function(e){return e.tagName==="INPUT"},a1=function(e){return wh(e)&&e.type==="hidden"},o1=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},i1=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},l1=function(e){if(!e.name)return!0;var n=e.form||Eo(e),r=function(i){return n.querySelectorAll('input[type="radio"][name="'+i+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=r(window.CSS.escape(e.name));else try{s=r(e.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var a=i1(s,e.form);return!a||a===e},c1=function(e){return wh(e)&&e.type==="radio"},d1=function(e){return c1(e)&&!l1(e)},u1=function(e){var n,r=e&&Eo(e),s=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==e){var o,i,l;for(a=!!((o=s)!==null&&o!==void 0&&(i=o.ownerDocument)!==null&&i!==void 0&&i.contains(s)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!a&&s;){var c,d,u;r=Eo(s),s=(c=r)===null||c===void 0?void 0:c.host,a=!!((d=s)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(s))}}return a},vh=function(e){var n=e.getBoundingClientRect(),r=n.width,s=n.height;return r===0&&s===0},f1=function(e,n){var r=n.displayCheck,s=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var a=fs.call(e,"details>summary:first-of-type"),o=a?e.parentElement:e;if(fs.call(o,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof s=="function"){for(var i=e;e;){var l=e.parentElement,c=Eo(e);if(l&&!l.shadowRoot&&s(l)===!0)return vh(e);e.assignedSlot?e=e.assignedSlot:!l&&c!==e.ownerDocument?e=c.host:e=l}e=i}if(u1(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return vh(e);return!1},h1=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 fs.call(n,"fieldset[disabled] *")?!0:!s.contains(e)}return!0}n=n.parentElement}return!1},g1=function(e,n){return!(n.disabled||Po(n)||a1(n)||f1(n,e)||o1(n)||h1(n))},cc=function(e,n){return!(d1(n)||yh(n)<0||!g1(e,n))},m1=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},p1=function t(e){var n=[],r=[];return e.forEach(function(s,a){var o=!!s.scopeParent,i=o?s.scopeParent:s,l=r1(i,o),c=o?t(s.candidates):i;l===0?o?n.push.apply(n,c):n.push(i):r.push({documentOrder:a,tabIndex:l,item:s,isScope:o,content:c})}),r.sort(s1).reduce(function(s,a){return a.isScope?s.push.apply(s,a.content):s.push(a.content),s},[]).concat(n)},To=function(e,n){n=n||{};var r;return n.getShadowRoot?r=n1([e],n.includeContainer,{filter:cc.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:m1}):r=t1(e,n.includeContainer,cc.bind(null,n)),p1(r)},b1=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return fs.call(e,Mo)===!1?!1:cc(n,e)};function xh(t){return B.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})},t)}const y1=B.useInsertionEffect||(t=>t());function gn(t){const e=B.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return y1(()=>{e.current=t}),B.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 dc="ArrowUp",na="ArrowDown",hs="ArrowLeft",gs="ArrowRight";function No(t,e,n){return Math.floor(t/e)!==n}function ra(t,e){return e<0||e>=t.current.length}function uc(t,e){return pt(t,{disabledIndices:e})}function kh(t,e){return pt(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function pt(t,e){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:s,amount:a=1}=e===void 0?{}:e;const o=t.current,i=s?c=>s.includes(c):c=>{const d=o[c];return d==null||d.hasAttribute("disabled")||d.getAttribute("aria-disabled")==="true"};let l=n;do l+=r?-a:a;while(l>=0&&l<=o.length-1&&i(l));return l}function w1(t,e){let{event:n,orientation:r,loop:s,cols:a,disabledIndices:o,minIndex:i,maxIndex:l,prevIndex:c,stopEvent:d=!1}=e,u=c;if(n.key===dc){if(d&&ft(n),c===-1)u=l;else if(u=pt(t,{startingIndex:u,amount:a,decrement:!0,disabledIndices:o}),s&&(c-a<i||u<0)){const f=c%a,h=l%a,m=l-(h-f);h===f?u=l:u=h>f?m:m-a}ra(t,u)&&(u=c)}if(n.key===na&&(d&&ft(n),c===-1?u=i:(u=pt(t,{startingIndex:c,amount:a,disabledIndices:o}),s&&c+a>l&&(u=pt(t,{startingIndex:c%a-a,amount:a,disabledIndices:o}))),ra(t,u)&&(u=c)),r==="both"){const f=cs(c/a);n.key===gs&&(d&&ft(n),c%a!==a-1?(u=pt(t,{startingIndex:c,disabledIndices:o}),s&&No(u,a,f)&&(u=pt(t,{startingIndex:c-c%a-1,disabledIndices:o}))):s&&(u=pt(t,{startingIndex:c-c%a-1,disabledIndices:o})),No(u,a,f)&&(u=c)),n.key===hs&&(d&&ft(n),c%a!==0?(u=pt(t,{startingIndex:c,disabledIndices:o,decrement:!0}),s&&No(u,a,f)&&(u=pt(t,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:o}))):s&&(u=pt(t,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:o})),No(u,a,f)&&(u=c));const h=cs(l/a)===f;ra(t,u)&&(s&&h?u=n.key===hs?l:pt(t,{startingIndex:c-c%a-1,disabledIndices:o}):u=c)}return u}function v1(t,e,n){const r=[];let s=0;return t.forEach((a,o)=>{let{width:i,height:l}=a;if(i>e&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+o+" is greater than grid columns");let c=!1;for(n&&(s=0);!c;){const d=[];for(let u=0;u<i;u++)for(let f=0;f<l;f++)d.push(s+u+f*e);s%e+i<=e&&d.every(u=>r[u]==null)?(d.forEach(u=>{r[u]=o}),c=!0):s++}}),[...r]}function x1(t,e,n,r,s){if(t===-1)return-1;const a=n.indexOf(t);switch(s){case"tl":return a;case"tr":return a+e[t].width-1;case"bl":return a+(e[t].height-1)*r;case"br":return n.lastIndexOf(t)}}function k1(t,e){return e.flatMap((n,r)=>t.includes(n)?[r]:[])}let _h=0;function Rn(t,e){e===void 0&&(e={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:s=!1}=e;r&&cancelAnimationFrame(_h);const a=()=>t==null?void 0:t.focus({preventScroll:n});s?a():_h=requestAnimationFrame(a)}var je=typeof document<"u"?_.useLayoutEffect:_.useEffect;function _1(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 S1(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 Sh=B.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function O1(t){let{children:e,elementsRef:n,labelsRef:r}=t;const[s,a]=B.useState(()=>new Map),o=B.useCallback(l=>{a(c=>new Map(c).set(l,null))},[]),i=B.useCallback(l=>{a(c=>{const d=new Map(c);return d.delete(l),d})},[]);return je(()=>{const l=new Map(s);Array.from(l.keys()).sort(_1).forEach((d,u)=>{l.set(d,u)}),S1(s,l)||a(l)},[s]),B.createElement(Sh.Provider,{value:B.useMemo(()=>({register:o,unregister:i,map:s,elementsRef:n,labelsRef:r}),[o,i,s,n,r])},e)}function C1(t){let{label:e}=t===void 0?{}:t;const[n,r]=B.useState(null),s=B.useRef(null),{register:a,unregister:o,map:i,elementsRef:l,labelsRef:c}=B.useContext(Sh),d=B.useCallback(u=>{if(s.current=u,n!==null&&(l.current[n]=u,c)){var f;const h=e!==void 0;c.current[n]=h?e:(f=u==null?void 0:u.textContent)!=null?f:null}},[n,l,c,e]);return je(()=>{const u=s.current;if(u)return a(u),()=>{o(u)}},[a,o]),je(()=>{const u=s.current?i.get(s.current):null;u!=null&&r(u)},[i]),B.useMemo(()=>({ref:d,index:n??-1}),[n,d])}function sa(){return sa=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},sa.apply(this,arguments)}let fc=!1,D1=0;const Oh=()=>"floating-ui-"+D1++;function M1(){const[t,e]=B.useState(()=>fc?Oh():void 0);return je(()=>{t==null&&e(Oh())},[]),B.useEffect(()=>{fc||(fc=!0)},[]),t}const jo=B.useId||M1;function E1(){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 P1=B.createContext(null),T1=B.createContext(null),Io=()=>{var t;return((t=B.useContext(P1))==null?void 0:t.id)||null},aa=()=>B.useContext(T1);function Dr(t){return"data-floating-ui-"+t}function mn(t){const e=_.useRef(t);return je(()=>{e.current=t}),e}const Ch=Dr("safe-polygon");function hc(t,e,n){return n&&!vo(n)?0:typeof t=="number"?t:t==null?void 0:t[e]}function N1(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:s,events:a,elements:{domReference:o,floating:i},refs:l}=t,{enabled:c=!0,delay:d=0,handleClose:u=null,mouseOnly:f=!1,restMs:h=0,move:m=!0}=e,p=aa(),b=Io(),v=mn(u),x=mn(d),k=B.useRef(),w=B.useRef(),y=B.useRef(),S=B.useRef(),N=B.useRef(!0),M=B.useRef(!1),T=B.useRef(()=>{}),E=B.useCallback(()=>{var C;const P=(C=s.current.openEvent)==null?void 0:C.type;return(P==null?void 0:P.includes("mouse"))&&P!=="mousedown"},[s]);B.useEffect(()=>{if(!c)return;function C(P){let{open:F}=P;F||(clearTimeout(w.current),clearTimeout(S.current),N.current=!0)}return a.on("openchange",C),()=>{a.off("openchange",C)}},[c,a]),B.useEffect(()=>{if(!c||!v.current||!n)return;function C(F){E()&&r(!1,F,"hover")}const P=xt(i).documentElement;return P.addEventListener("mouseleave",C),()=>{P.removeEventListener("mouseleave",C)}},[i,n,r,c,v,E]);const z=B.useCallback(function(C,P,F){P===void 0&&(P=!0),F===void 0&&(F="hover");const U=hc(x.current,"close",k.current);U&&!y.current?(clearTimeout(w.current),w.current=setTimeout(()=>r(!1,C,F),U)):P&&(clearTimeout(w.current),r(!1,C,F))},[x,r]),L=B.useCallback(()=>{T.current(),y.current=void 0},[]),O=B.useCallback(()=>{if(M.current){const C=xt(l.floating.current).body;C.style.pointerEvents="",C.removeAttribute(Ch),M.current=!1}},[l]);return B.useEffect(()=>{if(!c)return;function C(){return s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1}function P(Q){if(clearTimeout(w.current),N.current=!1,f&&!vo(k.current)||h>0&&hc(x.current,"open")===0)return;const $=hc(x.current,"open",k.current);$?w.current=setTimeout(()=>{r(!0,Q,"hover")},$):r(!0,Q,"hover")}function F(Q){if(C())return;T.current();const $=xt(i);if(clearTimeout(S.current),v.current){n||clearTimeout(w.current),y.current=v.current({...t,tree:p,x:Q.clientX,y:Q.clientY,onClose(){O(),L(),z(Q,!0,"safe-polygon")}});const H=y.current;$.addEventListener("mousemove",H),T.current=()=>{$.removeEventListener("mousemove",H)};return}(k.current==="touch"?!$e(i,Q.relatedTarget):!0)&&z(Q)}function U(Q){C()||v.current==null||v.current({...t,tree:p,x:Q.clientX,y:Q.clientY,onClose(){O(),L(),z(Q)}})(Q)}if(Ee(o)){const Q=o;return n&&Q.addEventListener("mouseleave",U),i==null||i.addEventListener("mouseleave",U),m&&Q.addEventListener("mousemove",P,{once:!0}),Q.addEventListener("mouseenter",P),Q.addEventListener("mouseleave",F),()=>{n&&Q.removeEventListener("mouseleave",U),i==null||i.removeEventListener("mouseleave",U),m&&Q.removeEventListener("mousemove",P),Q.removeEventListener("mouseenter",P),Q.removeEventListener("mouseleave",F)}}},[o,i,c,t,f,h,m,z,L,O,r,n,p,x,v,s]),je(()=>{var C;if(c&&n&&(C=v.current)!=null&&C.__options.blockPointerEvents&&E()){const F=xt(i).body;if(F.setAttribute(Ch,""),F.style.pointerEvents="none",M.current=!0,Ee(o)&&i){var P;const U=o,Q=p==null||(P=p.nodesRef.current.find($=>$.id===b))==null||(P=P.context)==null?void 0:P.elements.floating;return Q&&(Q.style.pointerEvents=""),U.style.pointerEvents="auto",i.style.pointerEvents="auto",()=>{U.style.pointerEvents="",i.style.pointerEvents=""}}}},[c,n,b,i,o,p,v,E]),je(()=>{n||(k.current=void 0,L(),O())},[n,L,O]),B.useEffect(()=>()=>{L(),clearTimeout(w.current),clearTimeout(S.current),O()},[c,o,L,O]),B.useMemo(()=>{if(!c)return{};function C(P){k.current=P.pointerType}return{reference:{onPointerDown:C,onPointerEnter:C,onMouseMove(P){n||h===0||(clearTimeout(S.current),S.current=setTimeout(()=>{N.current||r(!0,P.nativeEvent,"hover")},h))}},floating:{onMouseEnter(){clearTimeout(w.current)},onMouseLeave(P){z(P.nativeEvent,!1)}}}},[c,h,n,r,z])}function j1(t,e){var n;let r=[],s=(n=t.find(a=>a.id===e))==null?void 0:n.parentId;for(;s;){const a=t.find(o=>o.id===s);s=a==null?void 0:a.parentId,a&&(r=r.concat(a))}return r}function Mr(t,e){let n=t.filter(s=>{var a;return s.parentId===e&&((a=s.context)==null?void 0:a.open)}),r=n;for(;r.length;)r=t.filter(s=>{var a;return(a=r)==null?void 0:a.some(o=>{var i;return s.parentId===o.id&&((i=s.context)==null?void 0:i.open)})}),n=n.concat(r);return n}function I1(t,e){let n,r=-1;function s(a,o){o>r&&(n=a,r=o),Mr(t,a).forEach(l=>{s(l.id,o+1)})}return s(e,0),t.find(a=>a.id===n)}let ms=new WeakMap,Ao=new WeakSet,Ro={},gc=0;const A1=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Dh=t=>t&&(t.host||Dh(t.parentNode)),R1=(t,e)=>e.map(n=>{if(t.contains(n))return n;const r=Dh(n);return t.contains(r)?r:null}).filter(n=>n!=null);function L1(t,e,n,r){const s="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,o=R1(e,t),i=new Set,l=new Set(o),c=[];Ro[s]||(Ro[s]=new WeakMap);const d=Ro[s];o.forEach(u),f(e),i.clear();function u(h){!h||i.has(h)||(i.add(h),h.parentNode&&u(h.parentNode))}function f(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,m=>{if(i.has(m))f(m);else{const p=a?m.getAttribute(a):null,b=p!==null&&p!=="false",v=(ms.get(m)||0)+1,x=(d.get(m)||0)+1;ms.set(m,v),d.set(m,x),c.push(m),v===1&&b&&Ao.add(m),x===1&&m.setAttribute(s,""),!b&&a&&m.setAttribute(a,"true")}})}return gc++,()=>{c.forEach(h=>{const m=(ms.get(h)||0)-1,p=(d.get(h)||0)-1;ms.set(h,m),d.set(h,p),m||(!Ao.has(h)&&a&&h.removeAttribute(a),Ao.delete(h)),p||h.removeAttribute(s)}),gc--,gc||(ms=new WeakMap,ms=new WeakMap,Ao=new WeakSet,Ro={})}}function Mh(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=xt(t[0]).body;return L1(t.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,e,n)}const oa=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Eh(t,e){const n=To(t,oa());e==="prev"&&n.reverse();const r=n.indexOf(un(xt(t)));return n.slice(r+1)[0]}function Ph(){return Eh(document.body,"next")}function Th(){return Eh(document.body,"prev")}function ia(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!$e(n,r)}function F1(t){To(t,oa()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function W1(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 mc={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 B1;function Nh(t){t.key==="Tab"&&(t.target,clearTimeout(B1))}const Lo=B.forwardRef(function(e,n){const[r,s]=B.useState();je(()=>(Jl()&&s("button"),document.addEventListener("keydown",Nh),()=>{document.removeEventListener("keydown",Nh)}),[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Dr("focus-guard")]:"",style:mc};return B.createElement("span",sa({},e,a))}),jh=B.createContext(null),Ih=Dr("portal");function z1(t){let{id:e,root:n}=t===void 0?{}:t;const[r,s]=B.useState(null),a=jo(),o=Ah(),i=B.useRef(null);return je(()=>()=>{r==null||r.remove(),queueMicrotask(()=>{i.current=null})},[r]),je(()=>{if(i.current)return;const l=e?document.getElementById(e):null;if(!l)return;const c=document.createElement("div");c.id=a,c.setAttribute(Ih,""),l.appendChild(c),i.current=c,s(c)},[e,a]),je(()=>{if(i.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Ee(l)&&(l=l.current),l=l||document.body;let c=null;e&&(c=document.createElement("div"),c.id=e,l.appendChild(c));const d=document.createElement("div");d.id=a,d.setAttribute(Ih,""),l=c||l,l.appendChild(d),i.current=d,s(d)},[e,n,a,o]),r}function H1(t){let{children:e,id:n,root:r=null,preserveTabOrder:s=!0}=t;const a=z1({id:n,root:r}),[o,i]=B.useState(null),l=B.useRef(null),c=B.useRef(null),d=B.useRef(null),u=B.useRef(null),f=!!o&&!o.modal&&o.open&&s&&!!(r||a);return B.useEffect(()=>{if(!a||!s||o!=null&&o.modal)return;function h(m){a&&ia(m)&&(m.type==="focusin"?W1:F1)(a)}return a.addEventListener("focusin",h,!0),a.addEventListener("focusout",h,!0),()=>{a.removeEventListener("focusin",h,!0),a.removeEventListener("focusout",h,!0)}},[a,s,o==null?void 0:o.modal]),B.createElement(jh.Provider,{value:B.useMemo(()=>({preserveTabOrder:s,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:u,portalNode:a,setFocusManagerState:i}),[s,a])},f&&a&&B.createElement(Lo,{"data-type":"outside",ref:l,onFocus:h=>{if(ia(h,a)){var m;(m=d.current)==null||m.focus()}else{const p=Th()||(o==null?void 0:o.refs.domReference.current);p==null||p.focus()}}}),f&&a&&B.createElement("span",{"aria-owns":a.id,style:mc}),a&&rf.createPortal(e,a),f&&a&&B.createElement(Lo,{"data-type":"outside",ref:c,onFocus:h=>{if(ia(h,a)){var m;(m=u.current)==null||m.focus()}else{const p=Ph()||(o==null?void 0:o.refs.domReference.current);p==null||p.focus(),o!=null&&o.closeOnFocusOut&&(o==null||o.onOpenChange(!1,h.nativeEvent))}}}))}const Ah=()=>B.useContext(jh),Y1=20;let Er=[];function pc(t){Er=Er.filter(n=>n.isConnected);let e=t;if(!(!e||Sr(e)==="body")){if(!b1(e,oa())){const n=To(e,oa())[0];if(!n)return;e=n}Er.push(e),Er.length>Y1&&(Er=Er.slice(-20))}}function Rh(){return Er.slice().reverse().find(t=>t.isConnected)}const V1=B.forwardRef(function(e,n){return B.createElement("button",sa({},e,{type:"button",ref:n,tabIndex:-1,style:mc}))});function Lh(t){const{context:e,children:n,disabled:r=!1,order:s=["content"],guards:a=!0,initialFocus:o=0,returnFocus:i=!0,modal:l=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:d=!0}=t,{open:u,refs:f,nodeId:h,onOpenChange:m,events:p,dataRef:b,elements:{domReference:v,floating:x}}=e,k=typeof o=="number"&&o<0,w=Jf(v)&&k,y=A1()?a:!0,S=mn(s),N=mn(o),M=mn(i),T=aa(),E=Ah(),z=B.useRef(null),L=B.useRef(null),O=B.useRef(!1),C=B.useRef(!1),P=E!=null,F=B.useCallback(function(j){return j===void 0&&(j=x),j?To(j,oa()):[]},[x]),U=B.useCallback(j=>{const H=F(j);return S.current.map(R=>v&&R==="reference"?v:x&&R==="floating"?x:H).filter(Boolean).flat()},[v,x,S,F]);B.useEffect(()=>{if(r||!l)return;function j(R){if(R.key==="Tab"){$e(x,un(xt(x)))&&F().length===0&&!w&&ft(R);const A=U(),I=rr(R);S.current[0]==="reference"&&I===v&&(ft(R),R.shiftKey?Rn(A[A.length-1]):Rn(A[1])),S.current[1]==="floating"&&I===x&&R.shiftKey&&(ft(R),Rn(A[0]))}}const H=xt(x);return H.addEventListener("keydown",j),()=>{H.removeEventListener("keydown",j)}},[r,v,x,l,S,w,F,U]),B.useEffect(()=>{if(r||!d)return;function j(){C.current=!0,setTimeout(()=>{C.current=!1})}function H(R){const A=R.relatedTarget;queueMicrotask(()=>{const I=!($e(v,A)||$e(x,A)||$e(A,x)||$e(E==null?void 0:E.portalNode,A)||A!=null&&A.hasAttribute(Dr("focus-guard"))||T&&(Mr(T.nodesRef.current,h).find(D=>{var W,Z;return $e((W=D.context)==null?void 0:W.elements.floating,A)||$e((Z=D.context)==null?void 0:Z.elements.domReference,A)})||j1(T.nodesRef.current,h).find(D=>{var W,Z;return((W=D.context)==null?void 0:W.elements.floating)===A||((Z=D.context)==null?void 0:Z.elements.domReference)===A})));A&&I&&!C.current&&A!==Rh()&&(O.current=!0,m(!1,R))})}if(x&&ut(v))return v.addEventListener("focusout",H),v.addEventListener("pointerdown",j),!l&&x.addEventListener("focusout",H),()=>{v.removeEventListener("focusout",H),v.removeEventListener("pointerdown",j),!l&&x.removeEventListener("focusout",H)}},[r,v,x,l,h,T,E,m,d]),B.useEffect(()=>{var j;if(r)return;const H=Array.from((E==null||(j=E.portalNode)==null?void 0:j.querySelectorAll("["+Dr("portal")+"]"))||[]);if(x){const R=[x,...H,z.current,L.current,S.current.includes("reference")||w?v:null].filter(I=>I!=null),A=l||w?Mh(R,y,!y):Mh(R);return()=>{A()}}},[r,v,x,l,S,E,w,y]),je(()=>{if(r||!x)return;const j=xt(x),H=un(j);queueMicrotask(()=>{const R=U(x),A=N.current,I=(typeof A=="number"?R[A]:A.current)||x,D=$e(x,H);!k&&!D&&u&&Rn(I,{preventScroll:I===x})})},[r,u,x,k,U,N]),je(()=>{if(r||!x)return;let j=!1;const H=xt(x),R=un(H),A=b.current;pc(R);function I(D){let{reason:W,event:Z,nested:G}=D;W==="escape-key"&&f.domReference.current&&pc(f.domReference.current),W==="hover"&&Z.type==="mouseleave"&&(O.current=!0),W==="outside-press"&&(G?(O.current=!1,j=!0):O.current=!(Qf(Z)||Zl(Z)))}return p.on("openchange",I),()=>{p.off("openchange",I);const D=un(H),W=$e(x,D)||T&&Mr(T.nodesRef.current,h).some(J=>{var ee;return $e((ee=J.context)==null?void 0:ee.elements.floating,D)});(W||A.openEvent&&["click","mousedown"].includes(A.openEvent.type))&&f.domReference.current&&pc(f.domReference.current);const G=Rh();M.current&&!O.current&&ut(G)&&(!(G!==D&&D!==H.body)||W)&&Rn(G,{cancelPrevious:!1,preventScroll:j})}},[r,x,M,b,f,p,T,h]),je(()=>{if(!(r||!E))return E.setFocusManagerState({modal:l,closeOnFocusOut:d,open:u,onOpenChange:m,refs:f}),()=>{E.setFocusManagerState(null)}},[r,E,l,u,m,f,d]),je(()=>{if(r||!x||typeof MutationObserver!="function"||k)return;const j=()=>{const R=x.getAttribute("tabindex");S.current.includes("floating")||un(xt(x))!==f.domReference.current&&F().length===0?R!=="0"&&x.setAttribute("tabindex","0"):R!=="-1"&&x.setAttribute("tabindex","-1")};j();const H=new MutationObserver(j);return H.observe(x,{childList:!0,subtree:!0,attributes:!0}),()=>{H.disconnect()}},[r,x,f,S,F,k]);function Q(j){return r||!c||!l?null:B.createElement(V1,{ref:j==="start"?z:L,onClick:H=>m(!1,H.nativeEvent)},typeof c=="string"?c:"Dismiss")}const $=!r&&y&&(P||l);return B.createElement(B.Fragment,null,$&&B.createElement(Lo,{"data-type":"inside",ref:E==null?void 0:E.beforeInsideRef,onFocus:j=>{if(l){const R=U();Rn(s[0]==="reference"?R[0]:R[R.length-1])}else if(E!=null&&E.preserveTabOrder&&E.portalNode)if(O.current=!1,ia(j,E.portalNode)){const R=Ph()||v;R==null||R.focus()}else{var H;(H=E.beforeOutsideRef.current)==null||H.focus()}}}),!w&&Q("start"),n,Q("end"),$&&B.createElement(Lo,{"data-type":"inside",ref:E==null?void 0:E.afterInsideRef,onFocus:j=>{if(l)Rn(U()[0]);else if(E!=null&&E.preserveTabOrder&&E.portalNode)if(d&&(O.current=!0),ia(j,E.portalNode)){const R=Th()||v;R==null||R.focus()}else{var H;(H=E.afterOutsideRef.current)==null||H.focus()}}}))}const bc=new Set,U1=B.forwardRef(function(e,n){let{lockScroll:r=!1,...s}=e;const a=jo();return je(()=>{if(!r)return;bc.add(a);const o=/iP(hone|ad|od)|iOS/.test(Ql()),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,f=i.top?parseFloat(i.top):window.pageYOffset;if(i.overflow="hidden",d&&(i[c]=d+"px"),o){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:-(f-Math.floor(b))+"px",left:-(u-Math.floor(p))+"px",right:"0"})}return()=>{bc.delete(a),bc.size===0&&(Object.assign(i,{overflow:"",[c]:""}),o&&(Object.assign(i,{position:"",top:"",left:"",right:""}),window.scrollTo(u,f)))}},[a,r]),B.createElement("div",sa({ref:n},s,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...s.style}}))});function Fh(t){return ut(t.target)&&t.target.tagName==="BUTTON"}function Wh(t){return ec(t)}function Bh(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:s,elements:{domReference:a}}=t,{enabled:o=!0,event:i="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:d=!0}=e,u=B.useRef(),f=B.useRef(!1);return B.useMemo(()=>o?{reference:{onPointerDown(h){u.current=h.pointerType},onMouseDown(h){h.button===0&&(vo(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}vo(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||Fh(h))&&(h.key===" "&&!Wh(a)&&(h.preventDefault(),f.current=!0),h.key==="Enter"&&r(!(n&&l),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!d||Fh(h)||Wh(a)||h.key===" "&&f.current&&(f.current=!1,r(!(n&&l),h.nativeEvent,"click"))}}}:{},[o,s,i,c,d,a,l,n,r])}const X1={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},K1={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},zh=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 Hh(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,nodeId:s,elements:{reference:a,domReference:o,floating:i},dataRef:l}=t,{enabled:c=!0,escapeKey:d=!0,outsidePress:u=!0,outsidePressEvent:f="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:p=!1,bubbles:b,capture:v}=e,x=aa(),k=gn(typeof u=="function"?u:()=>!1),w=typeof u=="function"?k:u,y=B.useRef(!1),S=B.useRef(!1),{escapeKey:N,outsidePress:M}=zh(b),{escapeKey:T,outsidePress:E}=zh(v),z=gn(P=>{if(!n||!c||!d||P.key!=="Escape")return;const F=x?Mr(x.nodesRef.current,s):[];if(!N&&(P.stopPropagation(),F.length>0)){let U=!0;if(F.forEach(Q=>{var $;if(($=Q.context)!=null&&$.open&&!Q.context.dataRef.current.__escapeKeyBubbles){U=!1;return}}),!U)return}r(!1,l2(P)?P.nativeEvent:P,"escape-key")}),L=gn(P=>{var F;const U=()=>{var Q;z(P),(Q=rr(P))==null||Q.removeEventListener("keydown",U)};(F=rr(P))==null||F.addEventListener("keydown",U)}),O=gn(P=>{const F=y.current;y.current=!1;const U=S.current;if(S.current=!1,f==="click"&&U||F||typeof w=="function"&&!w(P))return;const Q=rr(P),$="["+Dr("inert")+"]",j=xt(i).querySelectorAll($);let H=Ee(Q)?Q:null;for(;H&&!tr(H);){const I=In(H);if(tr(I)||!Ee(I))break;H=I}if(j.length&&Ee(Q)&&!c2(Q)&&!$e(Q,i)&&Array.from(j).every(I=>!$e(H,I)))return;if(ut(Q)&&i){const I=Q.clientWidth>0&&Q.scrollWidth>Q.clientWidth,D=Q.clientHeight>0&&Q.scrollHeight>Q.clientHeight;let W=D&&P.offsetX>Q.clientWidth;if(D&&Gt(Q).direction==="rtl"&&(W=P.offsetX<=Q.offsetWidth-Q.clientWidth),W||I&&P.offsetY>Q.clientHeight)return}const R=x&&Mr(x.nodesRef.current,s).some(I=>{var D;return $l(P,(D=I.context)==null?void 0:D.elements.floating)});if($l(P,i)||$l(P,o)||R)return;const A=x?Mr(x.nodesRef.current,s):[];if(A.length>0){let I=!0;if(A.forEach(D=>{var W;if((W=D.context)!=null&&W.open&&!D.context.dataRef.current.__outsidePressBubbles){I=!1;return}}),!I)return}r(!1,P,"outside-press")}),C=gn(P=>{var F;const U=()=>{var Q;O(P),(Q=rr(P))==null||Q.removeEventListener(f,U)};(F=rr(P))==null||F.addEventListener(f,U)});return B.useEffect(()=>{if(!n||!c)return;l.current.__escapeKeyBubbles=N,l.current.__outsidePressBubbles=M;function P(Q){r(!1,Q,"ancestor-scroll")}const F=xt(i);d&&F.addEventListener("keydown",T?L:z,T),w&&F.addEventListener(f,E?C:O,E);let U=[];return p&&(Ee(o)&&(U=nr(o)),Ee(i)&&(U=U.concat(nr(i))),!Ee(a)&&a&&a.contextElement&&(U=U.concat(nr(a.contextElement)))),U=U.filter(Q=>{var $;return Q!==(($=F.defaultView)==null?void 0:$.visualViewport)}),U.forEach(Q=>{Q.addEventListener("scroll",P,{passive:!0})}),()=>{d&&F.removeEventListener("keydown",T?L:z,T),w&&F.removeEventListener(f,E?C:O,E),U.forEach(Q=>{Q.removeEventListener("scroll",P)})}},[l,i,o,a,d,w,f,n,r,p,c,N,M,z,T,L,O,E,C]),B.useEffect(()=>{y.current=!1},[w,f]),B.useMemo(()=>c?{reference:{onKeyDown:z,[X1[m]]:P=>{h&&r(!1,P.nativeEvent,"reference-press")}},floating:{onKeyDown:z,onMouseDown(){S.current=!0},onMouseUp(){S.current=!0},[K1[f]]:()=>{y.current=!0}}}:{},[c,h,f,m,r,z])}let yc;process.env.NODE_ENV!=="production"&&(yc=new Set);function Yh(t){var e;t===void 0&&(t={});const{open:n=!1,onOpenChange:r,nodeId:s}=t;if(process.env.NODE_ENV!=="production"){var a;const M="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((a=t.elements)!=null&&a.reference&&!Ee(t.elements.reference)){var o;if(!((o=yc)!=null&&o.has(M))){var i;(i=yc)==null||i.add(M),console.error(M)}}}const[l,c]=B.useState(null),d=((e=t.elements)==null?void 0:e.reference)||l,u=X2(t),f=aa(),h=Io()!=null,m=gn((M,T,E)=>{M&&(b.current.openEvent=T),v.emit("openchange",{open:M,event:T,reason:E,nested:h}),r==null||r(M,T,E)}),p=B.useRef(null),b=B.useRef({}),v=B.useState(()=>E1())[0],x=jo(),k=B.useCallback(M=>{const T=Ee(M)?{getBoundingClientRect:()=>M.getBoundingClientRect(),contextElement:M}:M;u.refs.setReference(T)},[u.refs]),w=B.useCallback(M=>{(Ee(M)||M===null)&&(p.current=M,c(M)),(Ee(u.refs.reference.current)||u.refs.reference.current===null||M!==null&&!Ee(M))&&u.refs.setReference(M)},[u.refs]),y=B.useMemo(()=>({...u.refs,setReference:w,setPositionReference:k,domReference:p}),[u.refs,w,k]),S=B.useMemo(()=>({...u.elements,domReference:d}),[u.elements,d]),N=B.useMemo(()=>({...u,refs:y,elements:S,dataRef:b,nodeId:s,floatingId:x,events:v,open:n,onOpenChange:m}),[u,s,x,v,n,m,y,S]);return je(()=>{const M=f==null?void 0:f.nodesRef.current.find(T=>T.id===s);M&&(M.context=N)}),B.useMemo(()=>({...u,context:N,refs:y,elements:S}),[u,y,S,N])}function G1(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,events:s,refs:a,elements:{domReference:o}}=t,{enabled:i=!0,visibleOnly:l=!0}=e,c=B.useRef(!1),d=B.useRef(),u=B.useRef(!0);return B.useEffect(()=>{if(!i)return;const f=Ct(o);function h(){!n&&ut(o)&&o===un(xt(o))&&(c.current=!0)}function m(){u.current=!0}return f.addEventListener("blur",h),f.addEventListener("keydown",m,!0),()=>{f.removeEventListener("blur",h),f.removeEventListener("keydown",m,!0)}},[o,n,i]),B.useEffect(()=>{if(!i)return;function f(h){let{reason:m}=h;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return s.on("openchange",f),()=>{s.off("openchange",f)}},[s,i]),B.useEffect(()=>()=>{clearTimeout(d.current)},[]),B.useMemo(()=>i?{reference:{onPointerDown(f){Zl(f.nativeEvent)||(u.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const h=rr(f.nativeEvent);if(l&&Ee(h))try{if(Jl()&&Zf())throw Error();if(!h.matches(":focus-visible"))return}catch{if(!u.current&&!ec(h))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const h=f.relatedTarget,m=Ee(h)&&h.hasAttribute(Dr("focus-guard"))&&h.getAttribute("data-type")==="outside";d.current=window.setTimeout(()=>{const p=un(o?o.ownerDocument:document);!h&&p===o||$e(a.floating.current,p)||$e(o,p)||m||r(!1,f.nativeEvent,"focus")})}}}:{},[i,l,o,a,r])}const Vh="active",Uh="selected";function wc(t,e,n){const r=new Map,s=n==="item";let a=t;if(s&&t){const{[Vh]:o,[Uh]:i,...l}=t;a=l}return{...n==="floating"&&{tabIndex:-1},...a,...e.map(o=>{const i=o?o[n]:null;return typeof i=="function"?t?i(t):null:i}).concat(t).reduce((o,i)=>(i&&Object.entries(i).forEach(l=>{let[c,d]=l;if(!(s&&[Vh,Uh].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof d=="function"){var u;(u=r.get(c))==null||u.push(d),o[c]=function(){for(var f,h=arguments.length,m=new Array(h),p=0;p<h;p++)m[p]=arguments[p];return(f=r.get(c))==null?void 0:f.map(b=>b(...m)).find(b=>b!==void 0)}}}else o[c]=d}),o),{})}}function Xh(t){t===void 0&&(t=[]);const e=t,n=B.useCallback(a=>wc(a,t,"reference"),e),r=B.useCallback(a=>wc(a,t,"floating"),e),s=B.useCallback(a=>wc(a,t,"item"),t.map(a=>a==null?void 0:a.item));return B.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:s}),[n,r,s])}let Kh=!1;function Fo(t,e,n){switch(t){case"vertical":return e;case"horizontal":return n;default:return e||n}}function Gh(t,e){return Fo(e,t===dc||t===na,t===hs||t===gs)}function vc(t,e,n){return Fo(e,t===na,n?t===hs:t===gs)||t==="Enter"||t===" "||t===""}function Q1(t,e,n){return Fo(e,n?t===hs:t===gs,t===na)}function Qh(t,e,n){return Fo(e,n?t===gs:t===hs,t===dc)}function Z1(t,e){const{open:n,onOpenChange:r,refs:s,elements:{domReference:a,floating:o}}=t,{listRef:i,activeIndex:l,onNavigate:c=()=>{},enabled:d=!0,selectedIndex:u=null,allowEscape:f=!1,loop:h=!1,nested:m=!1,rtl:p=!1,virtual:b=!1,focusItemOnOpen:v="auto",focusItemOnHover:x=!0,openOnArrowKeyDown:k=!0,disabledIndices:w=void 0,orientation:y="vertical",cols:S=1,scrollItemIntoView:N=!0,virtualItemRef:M,itemSizes:T,dense:E=!1}=e;process.env.NODE_ENV!=="production"&&(f&&(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(" "))),y==="vertical"&&S>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const z=Io(),L=aa(),O=gn(c),C=B.useRef(v),P=B.useRef(u??-1),F=B.useRef(null),U=B.useRef(!0),Q=B.useRef(O),$=B.useRef(!!o),j=B.useRef(!1),H=B.useRef(!1),R=mn(w),A=mn(n),I=mn(N),[D,W]=B.useState(),[Z,G]=B.useState(),J=gn(function(Y,se,ne){ne===void 0&&(ne=!1);const ce=Y.current[se.current];ce&&(b?(W(ce.id),L==null||L.events.emit("virtualfocus",ce),M&&(M.current=ce)):Rn(ce,{preventScroll:!0,sync:Zf()&&Jl()?Kh||j.current:!1}),requestAnimationFrame(()=>{const ge=I.current;ge&&ce&&(ne||!U.current)&&(ce.scrollIntoView==null||ce.scrollIntoView(typeof ge=="boolean"?{block:"nearest",inline:"nearest"}:ge))}))});je(()=>{document.createElement("div").focus({get preventScroll(){return Kh=!0,!1}})},[]),je(()=>{d&&(n&&o?C.current&&u!=null&&(H.current=!0,P.current=u,O(u)):$.current&&(P.current=-1,Q.current(null)))},[d,n,o,u,O]),je(()=>{if(d&&n&&o)if(l==null){if(j.current=!1,u!=null)return;if($.current&&(P.current=-1,J(i,P)),!$.current&&C.current&&(F.current!=null||C.current===!0&&F.current==null)){let Y=0;const se=()=>{i.current[0]==null?(Y<2&&(Y?requestAnimationFrame:queueMicrotask)(se),Y++):(P.current=F.current==null||vc(F.current,y,p)||m?uc(i,R.current):kh(i,R.current),F.current=null,O(P.current))};se()}}else ra(i,l)||(P.current=l,J(i,P,H.current),H.current=!1)},[d,n,o,l,u,m,i,y,p,O,J,R]),je(()=>{var Y;if(!d||o||!L||b||!$.current)return;const se=L.nodesRef.current,ne=(Y=se.find(ue=>ue.id===z))==null||(Y=Y.context)==null?void 0:Y.elements.floating,ce=un(xt(o)),ge=se.some(ue=>ue.context&&$e(ue.context.elements.floating,ce));ne&&!ge&&U.current&&ne.focus({preventScroll:!0})},[d,o,L,z,b]),je(()=>{if(!d||!L||!b||z)return;function Y(se){G(se.id),M&&(M.current=se)}return L.events.on("virtualfocus",Y),()=>{L.events.off("virtualfocus",Y)}},[d,L,b,z,M]),je(()=>{Q.current=O,$.current=!!o}),je(()=>{n||(F.current=null)},[n]);const ee=l!=null,re=B.useMemo(()=>{function Y(ne){if(!n)return;const ce=i.current.indexOf(ne);ce!==-1&&O(ce)}return{onFocus(ne){let{currentTarget:ce}=ne;Y(ce)},onClick:ne=>{let{currentTarget:ce}=ne;return ce.focus({preventScroll:!0})},...x&&{onMouseMove(ne){let{currentTarget:ce}=ne;Y(ce)},onPointerLeave(ne){let{pointerType:ce}=ne;!U.current||ce==="touch"||(P.current=-1,J(i,P),O(null),b||Rn(s.floating.current,{preventScroll:!0}))}}}},[n,s,J,x,i,O,b]);return B.useMemo(()=>{if(!d)return{};const Y=R.current;function se(ae){if(U.current=!1,j.current=!0,!A.current&&ae.currentTarget===s.floating.current)return;if(m&&Qh(ae.key,y,p)){ft(ae),r(!1,ae.nativeEvent,"list-navigation"),ut(a)&&!b&&a.focus();return}const Ye=P.current,pe=uc(i,Y),ze=kh(i,Y);if(ae.key==="Home"&&(ft(ae),P.current=pe,O(P.current)),ae.key==="End"&&(ft(ae),P.current=ze,O(P.current)),S>1){const Xe=T||Array.from({length:i.current.length},()=>({width:1,height:1})),qe=v1(Xe,S,E),Vt=qe.findIndex(Xt=>Xt!=null&&!(Y!=null&&Y.includes(Xt))),Ut=qe.reduce((Xt,vr,Kt)=>vr!=null&&!(Y!=null&&Y.includes(vr))?Kt:Xt,-1);if(P.current=qe[w1({current:qe.map(Xt=>Xt!=null?i.current[Xt]:null)},{event:ae,orientation:y,loop:h,cols:S,disabledIndices:k1([...Y||[],void 0],qe),minIndex:Vt,maxIndex:Ut,prevIndex:x1(P.current,Xe,qe,S,ae.key===na?"bl":ae.key===gs?"tr":"tl"),stopEvent:!0})],O(P.current),y==="both")return}if(Gh(ae.key,y)){if(ft(ae),n&&!b&&un(ae.currentTarget.ownerDocument)===ae.currentTarget){P.current=vc(ae.key,y,p)?pe:ze,O(P.current);return}vc(ae.key,y,p)?h?P.current=Ye>=ze?f&&Ye!==i.current.length?-1:pe:pt(i,{startingIndex:Ye,disabledIndices:Y}):P.current=Math.min(ze,pt(i,{startingIndex:Ye,disabledIndices:Y})):h?P.current=Ye<=pe?f&&Ye!==-1?i.current.length:ze:pt(i,{startingIndex:Ye,decrement:!0,disabledIndices:Y}):P.current=Math.max(pe,pt(i,{startingIndex:Ye,decrement:!0,disabledIndices:Y})),ra(i,P.current)?O(null):O(P.current)}}function ne(ae){v==="auto"&&Qf(ae.nativeEvent)&&(C.current=!0)}function ce(ae){C.current=v,v==="auto"&&Zl(ae.nativeEvent)&&(C.current=!0)}const ge=b&&n&&ee&&{"aria-activedescendant":Z||D},ue=i.current.find(ae=>(ae==null?void 0:ae.id)===D);return{reference:{...ge,onKeyDown(ae){U.current=!1;const Ye=ae.key.indexOf("Arrow")===0,pe=Q1(ae.key,y,p),ze=Qh(ae.key,y,p),Xe=Gh(ae.key,y),qe=(m?pe:Xe)||ae.key==="Enter"||ae.key.trim()==="";if(b&&n){const vr=L==null?void 0:L.nodesRef.current.find(Rl=>Rl.parentId==null),Kt=L&&vr?I1(L.nodesRef.current,vr.id):null;if(Ye&&Kt&&M){const Rl=new KeyboardEvent("keydown",{key:ae.key,bubbles:!0});if(pe||ze){var Vt,Ut;const gL=((Vt=Kt.context)==null?void 0:Vt.elements.domReference)===ae.currentTarget,Gv=ze&&!gL?(Ut=Kt.context)==null?void 0:Ut.elements.domReference:pe?ue:null;Gv&&(ft(ae),Gv.dispatchEvent(Rl),G(void 0))}if(Xe&&Kt.context&&Kt.context.open&&Kt.parentId&&ae.currentTarget!==Kt.context.elements.domReference){var Xt;ft(ae),(Xt=Kt.context.elements.domReference)==null||Xt.dispatchEvent(Rl);return}}return se(ae)}if(!(!n&&!k&&Ye)){if(qe&&(F.current=m&&Xe?null:ae.key),m){pe&&(ft(ae),n?(P.current=uc(i,Y),O(P.current)):r(!0,ae.nativeEvent,"list-navigation"));return}Xe&&(u!=null&&(P.current=u),ft(ae),!n&&k?r(!0,ae.nativeEvent,"list-navigation"):se(ae),n&&O(P.current))}},onFocus(){n&&O(null)},onPointerDown:ce,onMouseDown:ne,onClick:ne},floating:{"aria-orientation":y==="both"?void 0:y,...!Jf(a)&&ge,onKeyDown:se,onPointerMove(){U.current=!0}},item:re}},[a,s,D,Z,R,A,i,d,y,p,b,n,ee,m,u,k,f,S,h,v,O,r,re,L,M,T,E])}const J1=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Zh(t,e){var n;e===void 0&&(e={});const{open:r,floatingId:s}=t,{enabled:a=!0,role:o="dialog"}=e,i=(n=J1.get(o))!=null?n:o,l=jo(),d=Io()!=null;return B.useMemo(()=>{if(!a)return{};const u={id:s,...i&&{role:i}};return i==="tooltip"||o==="label"?{reference:{["aria-"+(o==="label"?"labelledby":"describedby")]:r?s:void 0},floating:u}:{reference:{"aria-expanded":r?"true":"false","aria-haspopup":i==="alertdialog"?"dialog":i,"aria-controls":r?s:void 0,...i==="listbox"&&{role:"combobox"},...i==="menu"&&{id:l},...i==="menu"&&d&&{role:"menuitem"},...o==="select"&&{"aria-autocomplete":"none"},...o==="combobox"&&{"aria-autocomplete":"list"}},floating:{...u,...i==="menu"&&{"aria-labelledby":l}},item(f){let{active:h,selected:m}=f;const p={role:"option",...h&&{id:s+"-option"}};switch(o){case"select":return{...p,"aria-selected":h&&m};case"combobox":return{...p,...h&&{"aria-selected":!0}}}return{}}}},[a,o,i,r,s,l,d])}function q1(t,e){var n;const{open:r,dataRef:s}=t,{listRef:a,activeIndex:o,onMatch:i,onTypingChange:l,enabled:c=!0,findMatch:d=null,resetMs:u=750,ignoreKeys:f=[],selectedIndex:h=null}=e,m=B.useRef(),p=B.useRef(""),b=B.useRef((n=h??o)!=null?n:-1),v=B.useRef(null),x=gn(i),k=gn(l),w=mn(d),y=mn(f);return je(()=>{r&&(clearTimeout(m.current),v.current=null,p.current="")},[r]),je(()=>{if(r&&p.current===""){var S;b.current=(S=h??o)!=null?S:-1}},[r,h,o]),B.useMemo(()=>{if(!c)return{};function S(T){T?s.current.typing||(s.current.typing=T,k(T)):s.current.typing&&(s.current.typing=T,k(T))}function N(T,E,z){const L=w.current?w.current(E,z):E.find(O=>(O==null?void 0:O.toLocaleLowerCase().indexOf(z.toLocaleLowerCase()))===0);return L?T.indexOf(L):-1}function M(T){const E=a.current;if(p.current.length>0&&p.current[0]!==" "&&(N(E,E,p.current)===-1?S(!1):T.key===" "&&ft(T)),E==null||y.current.includes(T.key)||T.key.length!==1||T.ctrlKey||T.metaKey||T.altKey)return;r&&T.key!==" "&&(ft(T),S(!0)),E.every(C=>{var P,F;return C?((P=C[0])==null?void 0:P.toLocaleLowerCase())!==((F=C[1])==null?void 0:F.toLocaleLowerCase()):!0})&&p.current===T.key&&(p.current="",b.current=v.current),p.current+=T.key,clearTimeout(m.current),m.current=setTimeout(()=>{p.current="",b.current=v.current,S(!1)},u);const L=b.current,O=N(E,[...E.slice((L||0)+1),...E.slice(0,(L||0)+1)],p.current);O!==-1?(x(O),v.current=O):T.key!==" "&&(p.current="",S(!1))}return{reference:{onKeyDown:M},floating:{onKeyDown:M,onKeyUp(T){T.key===" "&&S(!1)}}}},[c,r,s,a,u,y,w,x,k])}function Jh(t,e){const[n,r]=t;let s=!1;const a=e.length;for(let o=0,i=a-1;o<a;i=o++){const[l,c]=e[o]||[0,0],[d,u]=e[i]||[0,0];c>=r!=u>=r&&n<=(d-l)*(r-c)/(u-c)+l&&(s=!s)}return s}function $1(t,e){return t[0]>=e.x&&t[0]<=e.x+e.width&&t[1]>=e.y&&t[1]<=e.y+e.height}function e_(t){t===void 0&&(t={});const{buffer:e=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=t;let s,a=!1,o=null,i=null,l=performance.now();function c(u,f){const h=performance.now(),m=h-l;if(o===null||i===null||m===0)return o=u,i=f,l=h,null;const p=u-o,b=f-i,x=Math.sqrt(p*p+b*b)/m;return o=u,i=f,l=h,x}const d=u=>{let{x:f,y:h,placement:m,elements:p,onClose:b,nodeId:v,tree:x}=u;return function(w){function y(){clearTimeout(s),b()}if(clearTimeout(s),!p.domReference||!p.floating||m==null||f==null||h==null)return;const{clientX:S,clientY:N}=w,M=[S,N],T=rr(w),E=w.type==="mouseleave",z=$e(p.floating,T),L=$e(p.domReference,T),O=p.domReference.getBoundingClientRect(),C=p.floating.getBoundingClientRect(),P=m.split("-")[0],F=f>C.right-C.width/2,U=h>C.bottom-C.height/2,Q=$1(M,O),$=C.width>O.width,j=C.height>O.height,H=($?O:C).left,R=($?O:C).right,A=(j?O:C).top,I=(j?O:C).bottom;if(z&&(a=!0,!E))return;if(L&&(a=!1),L&&!E){a=!0;return}if(E&&Ee(w.relatedTarget)&&$e(p.floating,w.relatedTarget)||x&&Mr(x.nodesRef.current,v).some(Z=>{let{context:G}=Z;return G==null?void 0:G.open}))return;if(P==="top"&&h>=O.bottom-1||P==="bottom"&&h<=O.top+1||P==="left"&&f>=O.right-1||P==="right"&&f<=O.left+1)return y();let D=[];switch(P){case"top":D=[[H,O.top+1],[H,C.bottom-1],[R,C.bottom-1],[R,O.top+1]];break;case"bottom":D=[[H,C.top+1],[H,O.bottom-1],[R,O.bottom-1],[R,C.top+1]];break;case"left":D=[[C.right-1,I],[C.right-1,A],[O.left+1,A],[O.left+1,I]];break;case"right":D=[[O.right-1,I],[O.right-1,A],[C.left+1,A],[C.left+1,I]];break}function W(Z){let[G,J]=Z;switch(P){case"top":{const ee=[$?G+e/2:F?G+e*4:G-e*4,J+e+1],re=[$?G-e/2:F?G+e*4:G-e*4,J+e+1],Y=[[C.left,F||$?C.bottom-e:C.top],[C.right,F?$?C.bottom-e:C.top:C.bottom-e]];return[ee,re,...Y]}case"bottom":{const ee=[$?G+e/2:F?G+e*4:G-e*4,J-e],re=[$?G-e/2:F?G+e*4:G-e*4,J-e],Y=[[C.left,F||$?C.top+e:C.bottom],[C.right,F?$?C.top+e:C.bottom:C.top+e]];return[ee,re,...Y]}case"left":{const ee=[G+e+1,j?J+e/2:U?J+e*4:J-e*4],re=[G+e+1,j?J-e/2:U?J+e*4:J-e*4];return[...[[U||j?C.right-e:C.left,C.top],[U?j?C.right-e:C.left:C.right-e,C.bottom]],ee,re]}case"right":{const ee=[G-e,j?J+e/2:U?J+e*4:J-e*4],re=[G-e,j?J-e/2:U?J+e*4:J-e*4],Y=[[U||j?C.left+e:C.right,C.top],[U?j?C.left+e:C.right:C.left+e,C.bottom]];return[ee,re,...Y]}}}if(!Jh([S,N],D)){if(a&&!Q)return y();if(!E&&r){const Z=c(w.clientX,w.clientY);if(Z!==null&&Z<.1)return y()}Jh([S,N],W([f,h]))?!a&&r&&(s=window.setTimeout(y,40)):y()}}};return d.__options={blockPointerEvents:n},d}const t_=({arrowRef:t,placement:e})=>{const n=[];return n.push(G2(8)),n.push(e==="auto"?J2():Z2()),n.push(Q2({padding:8})),t!=null&&t.current&&n.push(q2({element:t.current})),n},n_=({placement:t})=>t==="auto"?void 0:t,r_=({placement:t})=>({top:"bottom",right:"left",bottom:"top",left:"right"})[t.split("-")[0]],qh=({open:t,arrowRef:e,placement:n="top",setOpen:r})=>Yh({placement:n_({placement:n}),open:t,onOpenChange:r,whileElementsMounted:fh,middleware:t_({placement:n,arrowRef:e})}),$h=({context:t,trigger:e,role:n="tooltip",interactions:r=[]})=>Xh([Bh(t,{enabled:e==="click"}),N1(t,{enabled:e==="hover",handleClose:e_()}),Hh(t),Zh(t,{role:n}),...r]),eg=_.createContext(void 0);function xc(){const t=_.useContext(eg);if(!t)throw new Error("useDropdownContext should be used within the DropdownContext provider!");return t}const kc=({className:t,theme:e={},...n})=>{const{theme:r}=xc(),s=e.divider??r.floating.divider;return g.jsx("div",{className:X(s,t),...n})},tg=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=xc(),a=n.header??s.floating.header;return g.jsxs(g.Fragment,{children:[g.jsx("div",{className:X(a,e),...r,children:t}),g.jsx(kc,{})]})},_c=_.forwardRef(({children:t,className:e,icon:n,onClick:r,theme:s={},...a},o)=>{const{ref:i,index:l}=C1({label:typeof t=="string"?t:void 0}),c=xh([o,i]),{theme:d,activeIndex:u,dismissOnClick:f,getItemProps:h,handleSelect:m}=xc(),p=u===l,b=te(d.floating.item,s),v=a;return g.jsx("li",{role:"menuitem",className:b.container,children:g.jsxs(zl,{ref:c,className:X(b.base,e),...v,...h({onClick:()=>{r==null||r(),f&&m(null)}}),tabIndex:p?0:-1,children:[n&&g.jsx(n,{className:b.icon}),t]})})});_c.displayName="DropdownItem";const s_={top:yx,right:ff,bottom:uf,left:bx},a_=({refs:t,children:e,inline:n,theme:r,disabled:s,setButtonWidth:a,getReferenceProps:o,renderTrigger:i,...l})=>{const c=t.reference,d=o();if(_.useEffect(()=>{c.current&&(a==null||a(c.current.clientWidth))},[c,a]),i){const u=i(r);return _.cloneElement(u,{ref:t.setReference,disabled:s,...d,...u.props})}return n?g.jsx("button",{type:"button",ref:t.setReference,className:r==null?void 0:r.inlineWrapper,disabled:s,...d,children:e}):g.jsx(Zs,{...l,disabled:s,type:"button",ref:t.setReference,...d,children:e})},ng=({children:t,className:e,dismissOnClick:n=!0,theme:r={},renderTrigger:s,...a})=>{const[o,i]=_.useState(!1),[l,c]=_.useState(null),[d,u]=_.useState(null),[f,h]=_.useState(void 0),m=_.useRef([]),p=_.useRef([]),b=te(fe().dropdown,r),v=a,x=a["data-testid"]||"flowbite-dropdown-target",{placement:k=a.inline?"bottom-start":"bottom",trigger:w="click",label:y,inline:S,arrowIcon:N=!0,...M}=v,T=_.useCallback(j=>{u(j),i(!1)},[]),E=_.useCallback(j=>{o?c(j):T(j)},[o,T]),{context:z,floatingStyles:L,refs:O}=qh({open:o,setOpen:i,placement:k}),C=Z1(z,{listRef:m,activeIndex:l,selectedIndex:d,onNavigate:c}),P=q1(z,{listRef:p,activeIndex:l,selectedIndex:d,onMatch:E}),{getReferenceProps:F,getFloatingProps:U,getItemProps:Q}=$h({context:z,role:"menu",trigger:w,interactions:[C,P]}),$=_.useMemo(()=>{const[j]=k.split("-");return s_[j]??uf},[k]);return g.jsxs(eg.Provider,{value:{theme:b,activeIndex:l,dismissOnClick:n,getItemProps:Q,handleSelect:T},children:[g.jsxs(a_,{...M,refs:O,inline:S,theme:b,"data-testid":x,className:X(b.floating.target,M.className),setButtonWidth:h,getReferenceProps:F,renderTrigger:s,children:[y,N&&g.jsx($,{className:b.arrowIcon})]}),o&&g.jsx(Lh,{context:z,modal:!1,children:g.jsx("div",{ref:O.setFloating,style:{...L,minWidth:f},"data-testid":"flowbite-dropdown","aria-expanded":o,...U({className:X(b.floating.base,b.floating.animation,"duration-100",!o&&b.floating.hidden,b.floating.style.auto,e)}),children:g.jsx(O1,{elementsRef:m,labelsRef:p,children:g.jsx("ul",{className:b.content,tabIndex:-1,children:t})})})})]})};ng.displayName="Dropdown",tg.displayName="Dropdown.Header",kc.displayName="Dropdown.Divider";const o_=Object.assign(ng,{Item:_c,Header:tg,Divider:kc}),rg=_.forwardRef(({className:t,color:e="gray",helperText:n,sizing:r="md",theme:s={},...a},o)=>{const i=te(fe().fileInput,s);return g.jsxs(g.Fragment,{children:[g.jsx("div",{className:X(i.root.base,t),children:g.jsx("div",{className:i.field.base,children:g.jsx("input",{className:X(i.field.input.base,i.field.input.colors[e],i.field.input.sizes[r]),...a,type:"file",ref:o})})}),n&&g.jsx(Js,{color:e,children:n})]})});rg.displayName="FileInput";const i_=_.forwardRef(({label:t,helperText:e,color:n="default",sizing:r="md",variant:s,disabled:a=!1,theme:o={},className:i,...l},c)=>{const d=_.useId(),u=te(fe().floatingLabel,o);return g.jsxs("div",{children:[g.jsxs("div",{className:X("relative",s==="standard"?"z-0":""),children:[g.jsx("input",{type:"text",id:l.id?l.id:"floatingLabel"+d,"aria-describedby":"outlined_success_help",className:X(u.input[n][s][r],i),placeholder:" ","data-testid":"floating-label",disabled:a,...l,ref:c}),g.jsx("label",{htmlFor:l.id?l.id:"floatingLabel"+d,className:X(u.label[n][s][r],i),children:t})]}),g.jsx("p",{id:"outlined_helper_text"+d,className:X(u.helperText[n],i),children:e})]})});i_.displayName="FloatingLabel";const sg=({alt:t,className:e,children:n,href:r,name:s,src:a,theme:o={},...i})=>{const l=te(fe().footer.brand,o);return g.jsx("div",{children:r?g.jsxs("a",{"data-testid":"flowbite-footer-brand",href:r,className:X(l.base,e),...i,children:[g.jsx("img",{alt:t,src:a,className:l.img}),g.jsx("span",{"data-testid":"flowbite-footer-brand-span",className:l.span,children:s}),n]}):g.jsx("img",{alt:t,"data-testid":"flowbite-footer-brand",src:a,className:X(l.img,e),...i})})},ag=({by:t,className:e,href:n,theme:r={},year:s,...a})=>{const o=te(fe().footer.copyright,r);return g.jsxs("div",{"data-testid":"flowbite-footer-copyright",className:X(o.base,e),...a,children:["© ",s,n?g.jsx("a",{href:n,className:o.href,children:t}):g.jsx("span",{"data-testid":"flowbite-footer-copyright-span",className:o.span,children:t})]})},og=({className:t,theme:e={},...n})=>{const r=te(fe().footer.divider,e);return g.jsx("hr",{"data-testid":"footer-divider",className:X(r.base,t),...n})},ig=({ariaLabel:t,className:e,href:n,icon:r,theme:s={},...a})=>{const o=te(fe().footer.icon,s);return g.jsx("div",{children:n?g.jsx("a",{"aria-label":t,"data-testid":"flowbite-footer-icon",href:n,className:X(o.base,e),...a,children:g.jsx(r,{className:o.size})}):g.jsx(r,{"data-testid":"flowbite-footer-icon",className:o.size,...a})})},lg=({as:t="a",children:e,className:n,href:r,theme:s={},...a})=>{const o=te(fe().footer.groupLink.link,s);return g.jsx("li",{className:X(o.base,n),children:g.jsx(t,{href:r,className:o.href,...a,children:e})})},cg=({children:t,className:e,col:n=!1,theme:r={},...s})=>{const a=te(fe().footer.groupLink,r);return g.jsx("ul",{"data-testid":"footer-groupLink",className:X(a.base,n&&a.col,e),...s,children:t})},dg=({as:t="h2",className:e,theme:n={},title:r,...s})=>{const a=te(fe().footer.title,n);return g.jsx(t,{"data-testid":"flowbite-footer-title",className:X(a.base,e),...s,children:r})},ug=({bgDark:t=!1,children:e,className:n,container:r=!1,theme:s={},...a})=>{const o=te(fe().footer,s);return g.jsx("footer",{"data-testid":"flowbite-footer",className:X(o.root.base,t&&o.root.bgDark,r&&o.root.container,n),...a,children:e})};ug.displayName="Footer",ag.displayName="Footer.Copyright",lg.displayName="Footer.Link",sg.displayName="Footer.Brand",cg.displayName="Footer.LinkGroup",ig.displayName="Footer.Icon",dg.displayName="Footer.Title",og.displayName="Footer.Divider",Object.assign(ug,{Copyright:ag,Link:lg,LinkGroup:cg,Brand:sg,Icon:ig,Title:dg,Divider:og});const Sc=({children:t,className:e,color:n="default",disabled:r=!1,theme:s={},value:a,...o})=>{const i=te(fe().label,s);return g.jsx("label",{className:X(i.root.base,i.root.colors[n],r&&i.root.disabled,e),"data-testid":"flowbite-label",...o,children:a??t??""})};Sc.displayName="Label";const fg=({children:t,className:e,icon:n,theme:r={},...s})=>{const a=te(fe().list.item,r);return g.jsxs("li",{className:X(a.withIcon[n?"on":"off"],e),...s,children:[n&&g.jsx(n,{className:X(a.icon)}),t]})},hg=({children:t,className:e,unstyled:n,nested:r,ordered:s,horizontal:a,theme:o={},...i})=>{const l=te(fe().list,o),c=s?"ol":"ul";return g.jsx(c,{className:X(l.root.base,l.root.ordered[s?"on":"off"],n&&l.root.unstyled,r&&l.root.nested,a&&l.root.horizontal,e),...i,children:t})};hg.displayName="List",fg.displayName="List.Item",Object.assign(hg,{Item:fg});const gg=({active:t,children:e,className:n,href:r,icon:s,onClick:a,theme:o={},disabled:i,...l})=>{const c=te(fe().listGroup.item,o),d=typeof r<"u",u=d?"a":"button";return g.jsx("li",{className:X(c.base,n),children:g.jsxs(u,{href:r,onClick:a,type:d?void 0:"button",disabled:i,className:X(c.link.active[t?"on":"off"],c.link.disabled[i?"on":"off"],c.link.base,c.link.href[d?"on":"off"]),...l,children:[s&&g.jsx(s,{"aria-hidden":!0,"data-testid":"flowbite-list-group-item-icon",className:c.link.icon}),e]})})},mg=({children:t,className:e,theme:n={},...r})=>{const s=te(fe().listGroup,n);return g.jsx("ul",{className:X(s.root.base,e),...r,children:t})};mg.displayName="ListGroup",gg.displayName="ListGroup.Item",Object.assign(mg,{Item:gg});const pg=_.createContext(void 0);function Oc(){const t=_.useContext(pg);if(!t)throw new Error("useModalContext should be used within the ModalContext provider!");return t}const bg=({children:t,className:e,theme:n={},...r})=>{const{theme:s,popup:a}=Oc(),o=te(s.body,n);return g.jsx("div",{className:X(o.base,a&&[o.popup],e),...r,children:t})},yg=({children:t,className:e,theme:n={},...r})=>{const{theme:s,popup:a}=Oc(),o=te(s.footer,n);return g.jsx("div",{className:X(o.base,!a&&o.popup,e),...r,children:t})},wg=({as:t="h3",children:e,className:n,theme:r={},id:s,...a})=>{const o=_.useId(),i=s||o,{theme:l,popup:c,onClose:d,setHeaderId:u}=Oc(),f=te(l.header,r);return _.useLayoutEffect(()=>(u(i),()=>u(void 0)),[i,u]),g.jsxs("div",{className:X(f.base,c&&f.popup,n),...a,children:[g.jsx(t,{id:i,className:f.title,children:e}),g.jsx("button",{"aria-label":"Close",className:f.close.base,type:"button",onClick:d,children:g.jsx(wx,{"aria-hidden":!0,className:f.close.icon})})]})},vg=_.forwardRef(({children:t,className:e,dismissible:n=!1,onClose:r,popup:s,position:a="center",root:o,show:i,size:l="2xl",theme:c={},initialFocus:d,...u},f)=>{const[h,m]=_.useState(void 0),p=te(fe().modal,c),{context:b}=Yh({open:i,onOpenChange:()=>r&&r()}),v=xh([b.refs.setFloating,f]),x=Bh(b),k=Hh(b,{outsidePressEvent:"mousedown",enabled:n}),w=Zh(b),{getFloatingProps:y}=Xh([x,k,w]);return i?g.jsx(pg.Provider,{value:{theme:p,popup:s,onClose:r,setHeaderId:m},children:g.jsx(H1,{root:o,children:g.jsx(U1,{lockScroll:!0,"data-testid":"modal-overlay",className:X(p.root.base,p.root.positions[a],i?p.root.show.on:p.root.show.off,e),...u,children:g.jsx(Lh,{context:b,initialFocus:d,children:g.jsx("div",{ref:v,...y(u),"aria-labelledby":h,className:X(p.content.base,p.root.sizes[l]),children:g.jsx("div",{className:p.content.inner,children:t})})})})})}):null});vg.displayName="Modal",wg.displayName="Modal.Header",bg.displayName="Modal.Body",yg.displayName="Modal.Footer",Object.assign(vg,{Header:wg,Body:bg,Footer:yg});const xg=_.createContext(void 0);function Wo(){const t=_.useContext(xg);if(!t)throw new Error("useNavBarContext should be used within the NavbarContext provider!");return t}const kg=({as:t="a",children:e,className:n,theme:r={},...s})=>{const{theme:a}=Wo(),o=te(a.brand,r);return g.jsx(t,{className:X(o.base,n),...s,children:e})},_g=({children:t,className:e,theme:n={},...r})=>{const{theme:s,isOpen:a}=Wo(),o=te(s.collapse,n);return g.jsx("div",{"data-testid":"flowbite-navbar-collapse",className:X(o.base,o.hidden[a?"off":"on"],e),...r,children:g.jsx("ul",{className:o.list,children:t})})},Sg=({active:t,as:e="a",disabled:n,children:r,className:s,theme:a={},onClick:o,...i})=>{const{theme:l,setIsOpen:c}=Wo(),d=te(l.link,a),u=f=>{c(!1),o==null||o(f)};return g.jsx("li",{children:g.jsx(e,{className:X(d.base,t&&d.active.on,!t&&!n&&d.active.off,d.disabled[n?"on":"off"],s),onClick:u,...i,children:r})})},Og=({barIcon:t=ax,className:e,theme:n={},...r})=>{const{theme:s,isOpen:a,setIsOpen:o}=Wo(),i=te(s.toggle,n),l=()=>{o(!a)};return g.jsxs("button",{"data-testid":"flowbite-navbar-toggle",onClick:l,className:X(i.base,e),...r,children:[g.jsx("span",{className:"sr-only",children:"Open main menu"}),g.jsx(t,{"aria-hidden":!0,className:i.icon})]})},Cg=({border:t,children:e,className:n,fluid:r=!1,menuOpen:s,rounded:a,theme:o={},...i})=>{const[l,c]=_.useState(s),d=te(fe().navbar,o);return g.jsx(xg.Provider,{value:{theme:d,isOpen:l,setIsOpen:c},children:g.jsx("nav",{className:X(d.root.base,d.root.bordered[t?"on":"off"],d.root.rounded[a?"on":"off"],n),...i,children:g.jsx("div",{className:X(d.root.inner.base,d.root.inner.fluid[r?"on":"off"]),children:e})})})};Cg.displayName="Navbar",kg.displayName="Navbar.Brand",_g.displayName="Navbar.Collapse",Sg.displayName="Navbar.Link",Og.displayName="Navbar.Toggle",Object.assign(Cg,{Brand:kg,Collapse:_g,Link:Sg,Toggle:Og});const l_=(t,e)=>t>=e?[]:[...Array(e-t+1).keys()].map(n=>n+t),Cc=({active:t,children:e,className:n,onClick:r,theme:s={},...a})=>{const o=te(fe().pagination,s);return g.jsx("button",{type:"button",className:X(t&&o.pages.selector.active,n),onClick:r,...a,children:e})};Cc.displayName="Pagination.Button";const Dc=({children:t,className:e,onClick:n,theme:r={},disabled:s=!1,...a})=>{const o=te(fe().pagination,r);return g.jsx("button",{type:"button",className:X(s&&o.pages.selector.disabled,e),disabled:s,onClick:n,...a,children:t})};Dc.displayName="Pagination.Navigation";const Dg=({className:t,currentPage:e,layout:n="pagination",nextLabel:r="Next",onPageChange:s,previousLabel:a="Previous",renderPaginationButton:o=u=>g.jsx(Cc,{...u}),showIcons:i=!1,theme:l={},totalPages:c,...d})=>{const u=te(fe().pagination,l),f=Math.min(Math.max(n==="pagination"?e+2:e+4,5),c),h=Math.max(1,f-4),m=()=>{s(Math.min(e+1,c))},p=()=>{s(Math.max(e-1,1))};return g.jsxs("nav",{className:X(u.base,t),...d,children:[n==="table"&&g.jsxs("div",{className:u.layout.table.base,children:["Showing ",g.jsx("span",{className:u.layout.table.span,children:h})," to ",g.jsx("span",{className:u.layout.table.span,children:f})," of ",g.jsx("span",{className:u.layout.table.span,children:c})," Entries"]}),g.jsxs("ul",{className:u.pages.base,children:[g.jsx("li",{children:g.jsxs(Dc,{className:X(u.pages.previous.base,i&&u.pages.showIcon),onClick:p,disabled:e===1,children:[i&&g.jsx(fx,{"aria-hidden":!0,className:u.pages.previous.icon}),a]})}),n==="pagination"&&l_(h,f).map(b=>g.jsx("li",{"aria-current":b===e?"page":void 0,children:o({className:X(u.pages.selector.base,e===b&&u.pages.selector.active),active:b===e,onClick:()=>s(b),children:b})},b)),g.jsx("li",{children:g.jsxs(Dc,{className:X(u.pages.next.base,i&&u.pages.showIcon),onClick:m,disabled:e===c,children:[r,i&&g.jsx(hx,{"aria-hidden":!0,className:u.pages.next.icon})]})})]})]})};Dg.displayName="Pagination",Object.assign(Dg,{Button:Cc});const Mg=_.forwardRef(({className:t,theme:e={},...n},r)=>{const s=te(fe().radio,e);return g.jsx("input",{ref:r,type:"radio",className:X(s.root.base,t),...n})});Mg.displayName="Radio";const c_=_.forwardRef(({className:t,sizing:e="md",theme:n={},...r},s)=>{const a=te(fe().rangeSlider,n);return g.jsx(g.Fragment,{children:g.jsx("div",{"data-testid":"flowbite-range-slider",className:X(a.root.base,t),children:g.jsx("div",{className:a.field.base,children:g.jsx("input",{ref:s,type:"range",className:X(a.field.input.base,a.field.input.sizes[e]),...r})})})})});c_.displayName="RangeSlider";const Eg=({children:t,className:e,percentFilled:n=0,theme:r={},...s})=>{const a=te(fe().ratingAdvanced,r);return g.jsxs("div",{className:X(a.base,e),...s,children:[g.jsx("span",{className:a.label,children:t}),g.jsx("div",{className:a.progress.base,children:g.jsx("div",{className:a.progress.fill,"data-testid":"flowbite-rating-fill",style:{width:`${n}%`}})}),g.jsx("span",{className:a.progress.label,children:`${n}%`})]})},Pg=_.createContext(void 0);function d_(){const t=_.useContext(Pg);if(!t)throw new Error("useRatingContext should be used within the RatingContext provider!");return t}const Tg=({className:t,filled:e=!0,starIcon:n=mx,theme:r={},...s})=>{const{theme:a,size:o="sm"}=d_(),i=te(a.star,r);return g.jsx(n,{"data-testid":"flowbite-rating-star",className:X(i.sizes[o],i[e?"filled":"empty"],t),...s})},Ng=({children:t,className:e,size:n="sm",theme:r={},...s})=>{const a=te(fe().rating,r);return g.jsx(Pg.Provider,{value:{theme:a,size:n},children:g.jsx("div",{className:X(a.root.base,e),...s,children:t})})};Ng.displayName="Rating",Tg.displayName="Rating.Star",Eg.displayName="Rating.Advanced",Object.assign(Ng,{Star:Tg,Advanced:Eg});const u_=_.forwardRef(({addon:t,children:e,className:n,color:r="gray",helperText:s,icon:a,shadow:o,sizing:i="md",theme:l={},...c},d)=>{const u=te(fe().select,l);return g.jsxs("div",{className:X(u.base,n),children:[t&&g.jsx("span",{className:u.addon,children:t}),g.jsxs("div",{className:u.field.base,children:[a&&g.jsx("div",{className:u.field.icon.base,children:g.jsx(a,{className:u.field.icon.svg})}),g.jsx("select",{className:X(u.field.select.base,u.field.select.colors[r],u.field.select.sizes[i],u.field.select.withIcon[a?"on":"off"],u.field.select.withAddon[t?"on":"off"],u.field.select.withShadow[o?"on":"off"]),...c,ref:d,children:e}),s&&g.jsx(Js,{color:r,children:s})]})]})});u_.displayName="Select";const f_=({animation:t="duration-300",arrow:e=!0,children:n,className:r,content:s,placement:a="top",style:o="dark",theme:i,trigger:l="hover",minWidth:c,...d})=>{const u=_.useRef(null),[f,h]=_.useState(!1),m=qh({open:f,placement:a,arrowRef:u,setOpen:h}),{context:p,middlewareData:{arrow:{x:b,y:v}={}},refs:x,strategy:k,update:w,x:y,y:S}=m,N=G1(p),{getFloatingProps:M,getReferenceProps:T}=$h({context:p,role:"tooltip",trigger:l,interactions:[N]});return _.useEffect(()=>{if(x.reference.current&&x.floating.current&&f)return fh(x.reference.current,x.floating.current,w)},[f,x.floating,x.reference,w]),g.jsxs(g.Fragment,{children:[g.jsx("div",{ref:x.setReference,className:i.target,"data-testid":"flowbite-tooltip-target",...T(),children:n}),g.jsxs("div",{ref:x.setFloating,"data-testid":"flowbite-tooltip",...M({className:X(i.base,t&&`${i.animation} ${t}`,!f&&i.hidden,i.style[o],r),style:{position:k,top:S??" ",left:y??" ",minWidth:c},...d}),children:[g.jsx("div",{className:i.content,children:s}),e&&g.jsx("div",{className:X(i.arrow.base,o==="dark"&&i.arrow.style.dark,o==="light"&&i.arrow.style.light,o==="auto"&&i.arrow.style.auto),"data-testid":"flowbite-tooltip-arrow",ref:u,style:{top:v??" ",left:b??" ",right:" ",bottom:" ",[r_({placement:m.placement})]:i.arrow.placement},children:" "})]})]})},Mc=({animation:t="duration-300",arrow:e=!0,children:n,className:r,content:s,placement:a="top",style:o="dark",theme:i={},trigger:l="hover",...c})=>{const d=te(fe().tooltip,i);return g.jsx(f_,{animation:t,arrow:e,content:s,placement:a,style:o,theme:d,trigger:l,className:r,...c,children:n})};Mc.displayName="Tooltip";const jg=_.createContext(void 0);function ps(){const t=_.useContext(jg);if(!t)throw new Error("useSidebarContext should be used within the SidebarContext provider!");return t}const Ec=_.createContext(void 0);function h_(){const t=_.useContext(Ec);if(!t)throw new Error("useSidebarItemContext should be used within the SidebarItemContext provider!");return t}const Ig=({children:t,className:e,icon:n,label:r,chevronIcon:s=Fl,renderChevronIcon:a,open:o=!1,theme:i={},...l})=>{const c=_.useId(),[d,u]=_.useState(o),{theme:f,isCollapsed:h}=ps(),m=te(f.collapse,i);_.useEffect(()=>u(o),[o]);const p=({children:b})=>g.jsx("li",{children:h&&!d?g.jsx(Mc,{content:r,placement:"right",children:b}):b});return g.jsxs(p,{children:[g.jsxs("button",{id:`flowbite-sidebar-collapse-${c}`,onClick:()=>u(!d),title:r,type:"button",className:X(m.button,e),...l,children:[n&&g.jsx(n,{"aria-hidden":!0,"data-testid":"flowbite-sidebar-collapse-icon",className:X(m.icon.base,m.icon.open[d?"on":"off"])}),h?g.jsx("span",{className:"sr-only",children:r}):g.jsxs(g.Fragment,{children:[g.jsx("span",{"data-testid":"flowbite-sidebar-collapse-label",className:m.label.base,children:r}),a?a(m,d):g.jsx(s,{"aria-hidden":!0,className:X(m.label.icon.base,m.label.icon.open[d?"on":"off"])})]})]}),g.jsx("ul",{"aria-labelledby":`flowbite-sidebar-collapse-${c}`,hidden:!d,className:m.list,children:g.jsx(Ec.Provider,{value:{isInsideCollapse:!0},children:t})})]})};Ig.displayName="Sidebar.Collapse";const Ag=({children:t,color:e="info",className:n,theme:r={},...s})=>{const{theme:a,isCollapsed:o}=ps(),i=te(a.cta,r);return g.jsx("div",{"data-testid":"sidebar-cta",hidden:o,className:X(i.base,i.color[e],n),...s,children:t})};Ag.displayName="Sidebar.CTA";const g_=({id:t,theme:e,isCollapsed:n,tooltipChildren:r,children:s,...a})=>g.jsx("li",{...a,children:n?g.jsx(Mc,{content:g.jsx(Rg,{id:t,theme:e,children:r}),placement:"right",children:s}):s}),Rg=({id:t,theme:e,children:n})=>g.jsx("span",{"data-testid":"flowbite-sidebar-item-content",id:`flowbite-sidebar-item-${t}`,className:X(e.content.base),children:n}),Lg=_.forwardRef(({active:t,as:e="a",children:n,className:r,icon:s,label:a,labelColor:o="info",theme:i={},...l},c)=>{var p,b,v,x;const d=_.useId(),{theme:u,isCollapsed:f}=ps(),{isInsideCollapse:h}=h_(),m=te(u.item,i);return g.jsx(g_,{theme:m,className:m.listItem,id:d,isCollapsed:f,tooltipChildren:n,children:g.jsxs(e,{"aria-labelledby":`flowbite-sidebar-item-${d}`,ref:c,className:X(m.base,t&&m.active,!f&&h&&((p=m.collapsed)==null?void 0:p.insideCollapse),r),...l,children:[s&&g.jsx(s,{"aria-hidden":!0,"data-testid":"flowbite-sidebar-item-icon",className:X((b=m.icon)==null?void 0:b.base,t&&((v=m.icon)==null?void 0:v.active))}),f&&!s&&g.jsx("span",{className:(x=m.collapsed)==null?void 0:x.noIcon,children:n.charAt(0).toLocaleUpperCase()??"?"}),!f&&g.jsx(Rg,{id:d,theme:m,children:n}),!f&&a&&g.jsx(Ef,{color:o,"data-testid":"flowbite-sidebar-label",hidden:f,className:m.label,children:a})]})})});Lg.displayName="Sidebar.Item";const Fg=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=ps(),a=te(s.itemGroup,n);return g.jsx("ul",{"data-testid":"flowbite-sidebar-item-group",className:X(a.base,e),...r,children:g.jsx(Ec.Provider,{value:{isInsideCollapse:!1},children:t})})};Fg.displayName="Sidebar.ItemGroup";const Wg=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=ps(),a=te(s.items,n);return g.jsx("div",{className:X(a.base,e),"data-testid":"flowbite-sidebar-items",...r,children:t})};Wg.displayName="Sidebar.Items";const Bg=({children:t,className:e,href:n,img:r,imgAlt:s="",theme:a={},...o})=>{const i=_.useId(),{theme:l,isCollapsed:c}=ps(),d=te(l.logo,a);return g.jsxs("a",{"aria-labelledby":`flowbite-sidebar-logo-${i}`,href:n,className:X(d.base,e),...o,children:[g.jsx("img",{alt:s,src:r,className:d.img}),g.jsx("span",{className:d.collapsed[c?"on":"off"],id:`flowbite-sidebar-logo-${i}`,children:t})]})};Bg.displayName="Sidebar.Logo";const zg=({children:t,as:e="nav",collapseBehavior:n="collapse",collapsed:r=!1,theme:s={},className:a,...o})=>{const i=te(fe().sidebar,s);return g.jsx(jg.Provider,{value:{theme:i,isCollapsed:r},children:g.jsx(e,{"aria-label":"Sidebar",hidden:r&&n==="hide",className:X(i.root.base,i.root.collapsed[r?"on":"off"],a),...o,children:g.jsx("div",{className:i.root.inner,children:t})})})};zg.displayName="Sidebar",Object.assign(zg,{Collapse:Ig,CTA:Ag,Item:Lg,Items:Wg,ItemGroup:Fg,Logo:Bg});const Hg=_.createContext(void 0);function m_(){const t=_.useContext(Hg);if(!t)throw new Error("useTableBodyContext should be used within the TableBodyContext provider!");return t}const Yg=_.createContext(void 0);function Pc(){const t=_.useContext(Yg);if(!t)throw new Error("useTableContext should be used within the TableContext provider!");return t}const Vg=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:a}=Pc(),o=te(a.body,n);return g.jsx(Hg.Provider,{value:{theme:o},children:g.jsx("tbody",{className:X(o.base,e),ref:s,...r,children:t})})});Vg.displayName="Table.Body";const Ug=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:a}=m_(),o=te(a.cell,n);return g.jsx("td",{className:X(o.base,e),ref:s,...r,children:t})});Ug.displayName="Table.Cell";const Xg=_.createContext(void 0);function p_(){const t=_.useContext(Xg);if(!t)throw new Error("useTableHeadContext should be used within the TableHeadContext provider!");return t}const Kg=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:a}=Pc(),o=te(a.head,n);return g.jsx(Xg.Provider,{value:{theme:o},children:g.jsx("thead",{className:X(o.base,e),ref:s,...r,children:g.jsx("tr",{children:t})})})});Kg.displayName="Table.Head";const Gg=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:a}=p_(),o=te(a.cell,n);return g.jsx("th",{className:X(o.base,e),ref:s,...r,children:t})});Gg.displayName="Table.HeadCell";const Qg=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:a,hoverable:o,striped:i}=Pc(),l=te(a.row,n);return g.jsx("tr",{ref:s,"data-testid":"table-row-element",className:X(l.base,i&&l.striped,o&&l.hovered,e),...r,children:t})});Qg.displayName="Table.Row";const Zg=_.forwardRef(({children:t,className:e,striped:n,hoverable:r,theme:s={},...a},o)=>{const i=te(fe().table,s);return g.jsx("div",{"data-testid":"table-element",className:X(i.root.wrapper),children:g.jsxs(Yg.Provider,{value:{theme:i,striped:n,hoverable:r},children:[g.jsx("div",{className:X(i.root.shadow,e)}),g.jsx("table",{className:X(i.root.base,e),...a,ref:o,children:t})]})})});Zg.displayName="Table";const sr=Object.assign(Zg,{Head:Kg,Body:Vg,Row:Qg,Cell:Ug,HeadCell:Gg}),Jg=({children:t,className:e})=>g.jsx("div",{className:e,children:t});Jg.displayName="Tabs.Item";const qg=_.forwardRef(({children:t,className:e,onActiveTabChange:n,style:r="default",theme:s={},...a},o)=>{const i=te(fe().tabs,s),l=_.useId(),c=_.useMemo(()=>_.Children.map(_.Children.toArray(t),({props:w})=>w),[t]),d=_.useRef([]),[u,f]=_.useState(Math.max(0,c.findIndex(w=>w.active))),[h,m]=_.useState(-1),p=w=>{f(w),n&&n(w)},b=({target:w})=>{p(w),m(w)},v=({event:w,target:y})=>{w.key==="ArrowLeft"&&m(Math.max(0,h-1)),w.key==="ArrowRight"&&m(Math.min(c.length-1,h+1)),w.key==="Enter"&&(p(y),m(y))},x=i.tablist.tabitem.styles[r],k=i.tabitemcontainer.styles[r];return _.useEffect(()=>{var w;(w=d.current[h])==null||w.focus()},[h]),_.useImperativeHandle(o,()=>({setActiveTab:p})),g.jsxs("div",{className:X(i.base,e),children:[g.jsx("div",{"aria-label":"Tabs",role:"tablist",className:X(i.tablist.base,i.tablist.styles[r],e),...a,children:c.map((w,y)=>g.jsxs("button",{type:"button","aria-controls":`${l}-tabpanel-${y}`,"aria-selected":y===u,className:X(i.tablist.tabitem.base,x.base,y===u&&x.active.on,y!==u&&!w.disabled&&x.active.off),disabled:w.disabled,id:`${l}-tab-${y}`,onClick:()=>b({target:y}),onKeyDown:S=>v({event:S,target:y}),ref:S=>d.current[y]=S,role:"tab",tabIndex:y===h?0:-1,style:{zIndex:y===h?2:1},children:[w.icon&&g.jsx(w.icon,{className:i.tablist.tabitem.icon}),w.title]},y))}),g.jsx("div",{className:X(i.tabitemcontainer.base,k),children:c.map((w,y)=>g.jsx("div",{"aria-labelledby":`${l}-tab-${y}`,className:i.tabpanel,hidden:y!==u,id:`${l}-tabpanel-${y}`,role:"tabpanel",tabIndex:0,children:w.children},y))})]})});qg.displayName="Tabs",Object.assign(qg,{Item:Jg});const b_=_.forwardRef(({className:t,color:e="gray",helperText:n,shadow:r,theme:s={},...a},o)=>{const i=te(fe().textarea,s);return g.jsxs(g.Fragment,{children:[g.jsx("textarea",{ref:o,className:X(i.base,i.colors[e],i.withShadow[r?"on":"off"],t),...a}),n&&g.jsx(Js,{color:e,children:n})]})});b_.displayName="Textarea";const $g=_.createContext(void 0);function Tc(){const t=_.useContext($g);if(!t)throw new Error("useTimelineContentContext should be used within the TimelineContentContext provider!");return t}const em=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=Tc(),a=te(s.body,n);return g.jsx("div",{className:X(a.base,e),...r,children:t})},tm=_.createContext(void 0);function Nc(){const t=_.useContext(tm);if(!t)throw new Error("useTimelineContext should be used within the TimelineContext provider!");return t}const nm=_.createContext(void 0);function rm(){const t=_.useContext(nm);if(!t)throw new Error("useTimelineItemContext should be used within the TimelineItemContext provider!");return t}const sm=({children:t,className:e,theme:n={},...r})=>{const{horizontal:s}=Nc(),{theme:a}=rm(),o=te(a.content,n);return g.jsx($g.Provider,{value:{theme:o},children:g.jsx("div",{"data-testid":"timeline-content",className:X(s&&o.root.base,e),...r,children:t})})},am=({children:t,className:e,theme:n={},...r})=>{const{theme:s,horizontal:a}=Nc(),o=te(s.item,n);return g.jsx(nm.Provider,{value:{theme:o},children:g.jsx("li",{"data-testid":"timeline-item",className:X(a&&o.root.horizontal,!a&&o.root.vertical,e),...r,children:t})})},om=({children:t,className:e,icon:n,theme:r={},...s})=>{const{horizontal:a}=Nc(),{theme:o}=rm(),i=te(o.point,r);return g.jsxs("div",{"data-testid":"timeline-point",className:X(a&&i.horizontal,!a&&i.vertical,e),...s,children:[t,n?g.jsx("span",{className:X(i.marker.icon.wrapper),children:g.jsx(n,{"aria-hidden":!0,className:X(i.marker.icon.base)})}):g.jsx("div",{className:X(a&&i.marker.base.horizontal,!a&&i.marker.base.vertical)}),a&&g.jsx("div",{className:X(i.line)})]})},im=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=Tc(),a=te(s.time,n);return g.jsx("time",{className:X(a.base,e),...r,children:t})},lm=({as:t="h3",children:e,className:n,theme:r={},...s})=>{const{theme:a}=Tc(),o=te(a.title,r);return g.jsx(t,{className:X(o.base,n),...s,children:e})},cm=({children:t,className:e,horizontal:n,theme:r={},...s})=>{const a=te(fe().timeline,r);return g.jsx(tm.Provider,{value:{theme:a,horizontal:n},children:g.jsx("ol",{"data-testid":"timeline-component",className:X(n&&a.root.direction.horizontal,!n&&a.root.direction.vertical,e),...s,children:t})})};cm.displayName="Timeline",am.displayName="Timeline.Item",om.displayName="Timeline.Point",sm.displayName="Timeline.Content",im.displayName="Timeline.Time",lm.displayName="Timeline.Title",em.displayName="Timeline.Body",Object.assign(cm,{Item:am,Point:om,Content:sm,Time:im,Title:lm,Body:em});const dm=_.createContext(void 0);function y_(){const t=_.useContext(dm);if(!t)throw new Error("useToastContext should be used within the ToastContext provider!");return t}const um=({className:t,onClick:e,theme:n={},xIcon:r=px,onDismiss:s,...a})=>{const{theme:o,duration:i,isClosed:l,isRemoved:c,setIsClosed:d,setIsRemoved:u}=y_(),f=te(o.toggle,n),h=m=>{if(e&&e(m),s){s();return}d(!l),setTimeout(()=>u(!c),i)};return g.jsx("button",{"aria-label":"Close",onClick:h,type:"button",className:X(f.base,t),...a,children:g.jsx(r,{"aria-hidden":!0,className:f.icon})})},w_={75:"duration-75",100:"duration-100",150:"duration-150",200:"duration-200",300:"duration-300",500:"duration-500",700:"duration-700",1e3:"duration-1000"},fm=({children:t,className:e,duration:n=300,theme:r={},...s})=>{const[a,o]=_.useState(!1),[i,l]=_.useState(!1),c=te(fe().toast,r);return i?null:g.jsx(dm.Provider,{value:{theme:c,duration:n,isClosed:a,isRemoved:i,setIsClosed:o,setIsRemoved:l},children:g.jsx("div",{"data-testid":"flowbite-toast",role:"alert",className:X(c.root.base,w_[n],a&&c.root.closed,e),...s,children:t})})};fm.displayName="Toast",um.displayName="Toast.Toggle",Object.assign(fm,{Toggle:um});const v_=_.forwardRef(({checked:t,className:e,color:n="blue",sizing:r="md",disabled:s,label:a,name:o,onChange:i,theme:l={},...c},d)=>{const u=_.useId(),f=te(fe().toggleSwitch,l),h=()=>i(!t),m=()=>{h()},p=b=>{b.code=="Enter"&&b.preventDefault()};return g.jsxs(g.Fragment,{children:[o&&t?g.jsx("input",{ref:d,checked:t,hidden:!0,name:o,readOnly:!0,type:"checkbox",className:"sr-only"}):null,g.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:X(f.root.base,f.root.active[s?"off":"on"],e),...c,children:[g.jsx("div",{"data-testid":"flowbite-toggleswitch-toggle",className:X(f.toggle.base,f.toggle.checked[t?"on":"off"],t&&f.toggle.checked.color[n],f.toggle.sizes[r])}),a!=null&&a.length?g.jsx("span",{"data-testid":"flowbite-toggleswitch-label",id:`${u}-flowbite-toggleswitch-label`,className:f.root.label,children:a}):null]})]})});v_.displayName="ToggleSwitch";const jc=_.forwardRef(({icon:t,placeholder:e,label:n,error:r,type:s,classInclude:a,maxLength:o,onChange:i,...l},c)=>g.jsxs("div",{className:`${n?"mb-3":""}`,children:[n&&g.jsx("label",{className:"mb-1 block font-semibold",children:n}),t===!0?g.jsx(qs,{className:`${a}`,maxLength:o,ref:c,type:s,rightIcon:lx,placeholder:e,onChange:i,...l}):g.jsx(qs,{className:`${a}`,maxLength:o,ref:c,type:s,placeholder:e,onChange:i,...l}),r&&g.jsx("p",{className:"mt-1 text-sm text-red-500",children:r})]}));jc.displayName="InputForm";const x_={"mth-password":"passwordInput-module__mth-password__R6DoN"},Ic=({placeholder:t,onChange:e,value:n,...r})=>{const[s,a]=_.useState(!1),o=()=>{a(!s)};return g.jsx("div",{className:"mb-5",children:g.jsxs("div",{className:"relative inline-block w-full",children:[g.jsx("input",{type:s?"text":"password",value:n,className:"w-full border p-2 pr-10",onChange:e,placeholder:t,...r}),g.jsx("button",{type:"button",onClick:o,className:x_["mth-password"],children:s?g.jsx(ox,{}):g.jsx(ix,{})})]})})},hm={mth_progress_bar:"progressBar-module__mth_progress_bar__q2V2y",mth_progress_bar_thumb:"progressBar-module__mth_progress_bar_thumb__OTDNJ"},gm=({start:t,end:e,current:n,type:r})=>{const s=(n-t)/(e-t)*100,a=Math.min(Math.max(s,0),100),o=()=>a<10?"left-0":a>90?"right-0":"left-1/2 transform -translate-x-1/2";return g.jsxs("div",{className:"w-full p-1",children:[g.jsxs("div",{className:"mb-2 flex justify-between text-xs text-gray-400",children:[g.jsx("span",{children:t.toLocaleString()}),g.jsx("span",{children:e.toLocaleString()})]}),g.jsxs("div",{className:"relative mb-5 h-1 w-full rounded-full bg-gray-200",children:[g.jsx("div",{className:`${hm.mth_progress_bar} absolute left-0 top-0 h-full rounded-full transition-all duration-300`,style:{width:`${a}%`}}),g.jsxs("div",{className:"absolute top-1/2 transform -translate-y-1/2 -translate-x-1/2",style:{left:`${a}%`},children:[g.jsx("div",{className:`${hm.mth_progress_bar_thumb} w-2 h-2 rounded-full shadow-lg`}),g.jsxs("div",{className:`absolute top-full mt-2 text-xs font-medium text-black whitespace-nowrap ${o()}`,children:[n.toLocaleString()," ",r==="percentage"?"%":""]})]})]})]})},mm=_.forwardRef(({options:t,label:e,error:n,value:r,onChange:s,id:a,...o},i)=>g.jsxs("div",{className:"mb-5",children:[g.jsxs("select",{ref:i,id:a,className:"h-8 w-full rounded-lg border px-3 py-0.5",value:r,onChange:s,...o,children:[g.jsx("option",{value:"0",children:e||"Seleccione una opción"}),t==null?void 0:t.map(l=>g.jsx("option",{value:l.value,children:l.label},l.value))]}),n&&g.jsx("p",{className:"mt-1 text-sm text-red-500",children:n})]}));mm.displayName="SelectForm";const pm={mth_card_indicator:"card-module__mth_card_indicator__lfgp3"},k_=({logo:t,number:e,title:n,start:r,end:s,current:a,type:o,classIm:i})=>{const l=c=>new Intl.NumberFormat("es-ES",{maximumFractionDigits:2,minimumFractionDigits:0}).format(c);return g.jsxs("div",{className:`${pm.mth_card_indicator} flex flex-col border bg-white px-3.5 py-4`,children:[g.jsx("div",{className:"flex justify-end",children:g.jsx(xr,{src:t||"",alt:"Icon",width:30,height:30,classIm:i})}),g.jsx("h2",{className:"mt-2 font-bold mth_card_indicator_title",id:`mth_card_indicator_${n}_title`,children:n.toUpperCase()}),g.jsxs("small",{className:"text-2xl font-extrabold mth_card_indicator_number",children:[l(e)," ",o==="percentage"?"%":""]}),g.jsx("div",{className:"mt-2 mth_card_indicator_progress_bar",children:g.jsx(gm,{start:r,end:s,current:a,type:o})})]})};/*!
8
+ */var $2=["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])"],Mo=$2.join(","),ph=typeof Element>"u",fs=ph?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Eo=!ph&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},Po=function t(e,n){var r;n===void 0&&(n=!0);var s=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),a=s===""||s==="true",o=a||n&&e&&t(e.parentNode);return o},e1=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},t1=function(e,n,r){if(Po(e))return[];var s=Array.prototype.slice.apply(e.querySelectorAll(Mo));return n&&fs.call(e,Mo)&&s.unshift(e),s=s.filter(r),s},n1=function t(e,n,r){for(var s=[],a=Array.from(e);a.length;){var o=a.shift();if(!Po(o,!1))if(o.tagName==="SLOT"){var i=o.assignedElements(),l=i.length?i:o.children,c=t(l,!0,r);r.flatten?s.push.apply(s,c):s.push({scopeParent:o,candidates:c})}else{var d=fs.call(o,Mo);d&&r.filter(o)&&(n||!e.includes(o))&&s.push(o);var u=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),f=!Po(u,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(u&&f){var h=t(u===!0?o.children:u.children,!0,r);r.flatten?s.push.apply(s,h):s.push({scopeParent:o,candidates:h})}else a.unshift.apply(a,o.children)}}return s},bh=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},yh=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e1(e))&&!bh(e)?0:e.tabIndex},r1=function(e,n){var r=yh(e);return r<0&&n&&!bh(e)?0:r},s1=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},wh=function(e){return e.tagName==="INPUT"},a1=function(e){return wh(e)&&e.type==="hidden"},o1=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},i1=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},l1=function(e){if(!e.name)return!0;var n=e.form||Eo(e),r=function(i){return n.querySelectorAll('input[type="radio"][name="'+i+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=r(window.CSS.escape(e.name));else try{s=r(e.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var a=i1(s,e.form);return!a||a===e},c1=function(e){return wh(e)&&e.type==="radio"},d1=function(e){return c1(e)&&!l1(e)},u1=function(e){var n,r=e&&Eo(e),s=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==e){var o,i,l;for(a=!!((o=s)!==null&&o!==void 0&&(i=o.ownerDocument)!==null&&i!==void 0&&i.contains(s)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!a&&s;){var c,d,u;r=Eo(s),s=(c=r)===null||c===void 0?void 0:c.host,a=!!((d=s)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(s))}}return a},vh=function(e){var n=e.getBoundingClientRect(),r=n.width,s=n.height;return r===0&&s===0},f1=function(e,n){var r=n.displayCheck,s=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var a=fs.call(e,"details>summary:first-of-type"),o=a?e.parentElement:e;if(fs.call(o,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof s=="function"){for(var i=e;e;){var l=e.parentElement,c=Eo(e);if(l&&!l.shadowRoot&&s(l)===!0)return vh(e);e.assignedSlot?e=e.assignedSlot:!l&&c!==e.ownerDocument?e=c.host:e=l}e=i}if(u1(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return vh(e);return!1},h1=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 fs.call(n,"fieldset[disabled] *")?!0:!s.contains(e)}return!0}n=n.parentElement}return!1},g1=function(e,n){return!(n.disabled||Po(n)||a1(n)||f1(n,e)||o1(n)||h1(n))},cc=function(e,n){return!(d1(n)||yh(n)<0||!g1(e,n))},m1=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},p1=function t(e){var n=[],r=[];return e.forEach(function(s,a){var o=!!s.scopeParent,i=o?s.scopeParent:s,l=r1(i,o),c=o?t(s.candidates):i;l===0?o?n.push.apply(n,c):n.push(i):r.push({documentOrder:a,tabIndex:l,item:s,isScope:o,content:c})}),r.sort(s1).reduce(function(s,a){return a.isScope?s.push.apply(s,a.content):s.push(a.content),s},[]).concat(n)},To=function(e,n){n=n||{};var r;return n.getShadowRoot?r=n1([e],n.includeContainer,{filter:cc.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:m1}):r=t1(e,n.includeContainer,cc.bind(null,n)),p1(r)},b1=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return fs.call(e,Mo)===!1?!1:cc(n,e)};function xh(t){return B.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})},t)}const y1=B.useInsertionEffect||(t=>t());function gn(t){const e=B.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return y1(()=>{e.current=t}),B.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 dc="ArrowUp",na="ArrowDown",hs="ArrowLeft",gs="ArrowRight";function No(t,e,n){return Math.floor(t/e)!==n}function ra(t,e){return e<0||e>=t.current.length}function uc(t,e){return pt(t,{disabledIndices:e})}function kh(t,e){return pt(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function pt(t,e){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:s,amount:a=1}=e===void 0?{}:e;const o=t.current,i=s?c=>s.includes(c):c=>{const d=o[c];return d==null||d.hasAttribute("disabled")||d.getAttribute("aria-disabled")==="true"};let l=n;do l+=r?-a:a;while(l>=0&&l<=o.length-1&&i(l));return l}function w1(t,e){let{event:n,orientation:r,loop:s,cols:a,disabledIndices:o,minIndex:i,maxIndex:l,prevIndex:c,stopEvent:d=!1}=e,u=c;if(n.key===dc){if(d&&ft(n),c===-1)u=l;else if(u=pt(t,{startingIndex:u,amount:a,decrement:!0,disabledIndices:o}),s&&(c-a<i||u<0)){const f=c%a,h=l%a,m=l-(h-f);h===f?u=l:u=h>f?m:m-a}ra(t,u)&&(u=c)}if(n.key===na&&(d&&ft(n),c===-1?u=i:(u=pt(t,{startingIndex:c,amount:a,disabledIndices:o}),s&&c+a>l&&(u=pt(t,{startingIndex:c%a-a,amount:a,disabledIndices:o}))),ra(t,u)&&(u=c)),r==="both"){const f=cs(c/a);n.key===gs&&(d&&ft(n),c%a!==a-1?(u=pt(t,{startingIndex:c,disabledIndices:o}),s&&No(u,a,f)&&(u=pt(t,{startingIndex:c-c%a-1,disabledIndices:o}))):s&&(u=pt(t,{startingIndex:c-c%a-1,disabledIndices:o})),No(u,a,f)&&(u=c)),n.key===hs&&(d&&ft(n),c%a!==0?(u=pt(t,{startingIndex:c,disabledIndices:o,decrement:!0}),s&&No(u,a,f)&&(u=pt(t,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:o}))):s&&(u=pt(t,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:o})),No(u,a,f)&&(u=c));const h=cs(l/a)===f;ra(t,u)&&(s&&h?u=n.key===hs?l:pt(t,{startingIndex:c-c%a-1,disabledIndices:o}):u=c)}return u}function v1(t,e,n){const r=[];let s=0;return t.forEach((a,o)=>{let{width:i,height:l}=a;if(i>e&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+o+" is greater than grid columns");let c=!1;for(n&&(s=0);!c;){const d=[];for(let u=0;u<i;u++)for(let f=0;f<l;f++)d.push(s+u+f*e);s%e+i<=e&&d.every(u=>r[u]==null)?(d.forEach(u=>{r[u]=o}),c=!0):s++}}),[...r]}function x1(t,e,n,r,s){if(t===-1)return-1;const a=n.indexOf(t);switch(s){case"tl":return a;case"tr":return a+e[t].width-1;case"bl":return a+(e[t].height-1)*r;case"br":return n.lastIndexOf(t)}}function k1(t,e){return e.flatMap((n,r)=>t.includes(n)?[r]:[])}let _h=0;function Rn(t,e){e===void 0&&(e={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:s=!1}=e;r&&cancelAnimationFrame(_h);const a=()=>t==null?void 0:t.focus({preventScroll:n});s?a():_h=requestAnimationFrame(a)}var je=typeof document<"u"?_.useLayoutEffect:_.useEffect;function _1(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 S1(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 Sh=B.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function O1(t){let{children:e,elementsRef:n,labelsRef:r}=t;const[s,a]=B.useState(()=>new Map),o=B.useCallback(l=>{a(c=>new Map(c).set(l,null))},[]),i=B.useCallback(l=>{a(c=>{const d=new Map(c);return d.delete(l),d})},[]);return je(()=>{const l=new Map(s);Array.from(l.keys()).sort(_1).forEach((d,u)=>{l.set(d,u)}),S1(s,l)||a(l)},[s]),B.createElement(Sh.Provider,{value:B.useMemo(()=>({register:o,unregister:i,map:s,elementsRef:n,labelsRef:r}),[o,i,s,n,r])},e)}function C1(t){let{label:e}=t===void 0?{}:t;const[n,r]=B.useState(null),s=B.useRef(null),{register:a,unregister:o,map:i,elementsRef:l,labelsRef:c}=B.useContext(Sh),d=B.useCallback(u=>{if(s.current=u,n!==null&&(l.current[n]=u,c)){var f;const h=e!==void 0;c.current[n]=h?e:(f=u==null?void 0:u.textContent)!=null?f:null}},[n,l,c,e]);return je(()=>{const u=s.current;if(u)return a(u),()=>{o(u)}},[a,o]),je(()=>{const u=s.current?i.get(s.current):null;u!=null&&r(u)},[i]),B.useMemo(()=>({ref:d,index:n??-1}),[n,d])}function sa(){return sa=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},sa.apply(this,arguments)}let fc=!1,D1=0;const Oh=()=>"floating-ui-"+D1++;function M1(){const[t,e]=B.useState(()=>fc?Oh():void 0);return je(()=>{t==null&&e(Oh())},[]),B.useEffect(()=>{fc||(fc=!0)},[]),t}const jo=B.useId||M1;function E1(){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 P1=B.createContext(null),T1=B.createContext(null),Io=()=>{var t;return((t=B.useContext(P1))==null?void 0:t.id)||null},aa=()=>B.useContext(T1);function Dr(t){return"data-floating-ui-"+t}function mn(t){const e=_.useRef(t);return je(()=>{e.current=t}),e}const Ch=Dr("safe-polygon");function hc(t,e,n){return n&&!vo(n)?0:typeof t=="number"?t:t==null?void 0:t[e]}function N1(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:s,events:a,elements:{domReference:o,floating:i},refs:l}=t,{enabled:c=!0,delay:d=0,handleClose:u=null,mouseOnly:f=!1,restMs:h=0,move:m=!0}=e,p=aa(),b=Io(),v=mn(u),x=mn(d),k=B.useRef(),w=B.useRef(),y=B.useRef(),S=B.useRef(),N=B.useRef(!0),M=B.useRef(!1),T=B.useRef(()=>{}),E=B.useCallback(()=>{var C;const P=(C=s.current.openEvent)==null?void 0:C.type;return(P==null?void 0:P.includes("mouse"))&&P!=="mousedown"},[s]);B.useEffect(()=>{if(!c)return;function C(P){let{open:F}=P;F||(clearTimeout(w.current),clearTimeout(S.current),N.current=!0)}return a.on("openchange",C),()=>{a.off("openchange",C)}},[c,a]),B.useEffect(()=>{if(!c||!v.current||!n)return;function C(F){E()&&r(!1,F,"hover")}const P=xt(i).documentElement;return P.addEventListener("mouseleave",C),()=>{P.removeEventListener("mouseleave",C)}},[i,n,r,c,v,E]);const z=B.useCallback(function(C,P,F){P===void 0&&(P=!0),F===void 0&&(F="hover");const U=hc(x.current,"close",k.current);U&&!y.current?(clearTimeout(w.current),w.current=setTimeout(()=>r(!1,C,F),U)):P&&(clearTimeout(w.current),r(!1,C,F))},[x,r]),L=B.useCallback(()=>{T.current(),y.current=void 0},[]),O=B.useCallback(()=>{if(M.current){const C=xt(l.floating.current).body;C.style.pointerEvents="",C.removeAttribute(Ch),M.current=!1}},[l]);return B.useEffect(()=>{if(!c)return;function C(){return s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1}function P(Q){if(clearTimeout(w.current),N.current=!1,f&&!vo(k.current)||h>0&&hc(x.current,"open")===0)return;const $=hc(x.current,"open",k.current);$?w.current=setTimeout(()=>{r(!0,Q,"hover")},$):r(!0,Q,"hover")}function F(Q){if(C())return;T.current();const $=xt(i);if(clearTimeout(S.current),v.current){n||clearTimeout(w.current),y.current=v.current({...t,tree:p,x:Q.clientX,y:Q.clientY,onClose(){O(),L(),z(Q,!0,"safe-polygon")}});const H=y.current;$.addEventListener("mousemove",H),T.current=()=>{$.removeEventListener("mousemove",H)};return}(k.current==="touch"?!$e(i,Q.relatedTarget):!0)&&z(Q)}function U(Q){C()||v.current==null||v.current({...t,tree:p,x:Q.clientX,y:Q.clientY,onClose(){O(),L(),z(Q)}})(Q)}if(Ee(o)){const Q=o;return n&&Q.addEventListener("mouseleave",U),i==null||i.addEventListener("mouseleave",U),m&&Q.addEventListener("mousemove",P,{once:!0}),Q.addEventListener("mouseenter",P),Q.addEventListener("mouseleave",F),()=>{n&&Q.removeEventListener("mouseleave",U),i==null||i.removeEventListener("mouseleave",U),m&&Q.removeEventListener("mousemove",P),Q.removeEventListener("mouseenter",P),Q.removeEventListener("mouseleave",F)}}},[o,i,c,t,f,h,m,z,L,O,r,n,p,x,v,s]),je(()=>{var C;if(c&&n&&(C=v.current)!=null&&C.__options.blockPointerEvents&&E()){const F=xt(i).body;if(F.setAttribute(Ch,""),F.style.pointerEvents="none",M.current=!0,Ee(o)&&i){var P;const U=o,Q=p==null||(P=p.nodesRef.current.find($=>$.id===b))==null||(P=P.context)==null?void 0:P.elements.floating;return Q&&(Q.style.pointerEvents=""),U.style.pointerEvents="auto",i.style.pointerEvents="auto",()=>{U.style.pointerEvents="",i.style.pointerEvents=""}}}},[c,n,b,i,o,p,v,E]),je(()=>{n||(k.current=void 0,L(),O())},[n,L,O]),B.useEffect(()=>()=>{L(),clearTimeout(w.current),clearTimeout(S.current),O()},[c,o,L,O]),B.useMemo(()=>{if(!c)return{};function C(P){k.current=P.pointerType}return{reference:{onPointerDown:C,onPointerEnter:C,onMouseMove(P){n||h===0||(clearTimeout(S.current),S.current=setTimeout(()=>{N.current||r(!0,P.nativeEvent,"hover")},h))}},floating:{onMouseEnter(){clearTimeout(w.current)},onMouseLeave(P){z(P.nativeEvent,!1)}}}},[c,h,n,r,z])}function j1(t,e){var n;let r=[],s=(n=t.find(a=>a.id===e))==null?void 0:n.parentId;for(;s;){const a=t.find(o=>o.id===s);s=a==null?void 0:a.parentId,a&&(r=r.concat(a))}return r}function Mr(t,e){let n=t.filter(s=>{var a;return s.parentId===e&&((a=s.context)==null?void 0:a.open)}),r=n;for(;r.length;)r=t.filter(s=>{var a;return(a=r)==null?void 0:a.some(o=>{var i;return s.parentId===o.id&&((i=s.context)==null?void 0:i.open)})}),n=n.concat(r);return n}function I1(t,e){let n,r=-1;function s(a,o){o>r&&(n=a,r=o),Mr(t,a).forEach(l=>{s(l.id,o+1)})}return s(e,0),t.find(a=>a.id===n)}let ms=new WeakMap,Ao=new WeakSet,Ro={},gc=0;const A1=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Dh=t=>t&&(t.host||Dh(t.parentNode)),R1=(t,e)=>e.map(n=>{if(t.contains(n))return n;const r=Dh(n);return t.contains(r)?r:null}).filter(n=>n!=null);function L1(t,e,n,r){const s="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,o=R1(e,t),i=new Set,l=new Set(o),c=[];Ro[s]||(Ro[s]=new WeakMap);const d=Ro[s];o.forEach(u),f(e),i.clear();function u(h){!h||i.has(h)||(i.add(h),h.parentNode&&u(h.parentNode))}function f(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,m=>{if(i.has(m))f(m);else{const p=a?m.getAttribute(a):null,b=p!==null&&p!=="false",v=(ms.get(m)||0)+1,x=(d.get(m)||0)+1;ms.set(m,v),d.set(m,x),c.push(m),v===1&&b&&Ao.add(m),x===1&&m.setAttribute(s,""),!b&&a&&m.setAttribute(a,"true")}})}return gc++,()=>{c.forEach(h=>{const m=(ms.get(h)||0)-1,p=(d.get(h)||0)-1;ms.set(h,m),d.set(h,p),m||(!Ao.has(h)&&a&&h.removeAttribute(a),Ao.delete(h)),p||h.removeAttribute(s)}),gc--,gc||(ms=new WeakMap,ms=new WeakMap,Ao=new WeakSet,Ro={})}}function Mh(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=xt(t[0]).body;return L1(t.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,e,n)}const oa=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Eh(t,e){const n=To(t,oa());e==="prev"&&n.reverse();const r=n.indexOf(un(xt(t)));return n.slice(r+1)[0]}function Ph(){return Eh(document.body,"next")}function Th(){return Eh(document.body,"prev")}function ia(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!$e(n,r)}function F1(t){To(t,oa()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function W1(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 mc={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 B1;function Nh(t){t.key==="Tab"&&(t.target,clearTimeout(B1))}const Lo=B.forwardRef(function(e,n){const[r,s]=B.useState();je(()=>(Jl()&&s("button"),document.addEventListener("keydown",Nh),()=>{document.removeEventListener("keydown",Nh)}),[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Dr("focus-guard")]:"",style:mc};return B.createElement("span",sa({},e,a))}),jh=B.createContext(null),Ih=Dr("portal");function z1(t){let{id:e,root:n}=t===void 0?{}:t;const[r,s]=B.useState(null),a=jo(),o=Ah(),i=B.useRef(null);return je(()=>()=>{r==null||r.remove(),queueMicrotask(()=>{i.current=null})},[r]),je(()=>{if(i.current)return;const l=e?document.getElementById(e):null;if(!l)return;const c=document.createElement("div");c.id=a,c.setAttribute(Ih,""),l.appendChild(c),i.current=c,s(c)},[e,a]),je(()=>{if(i.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Ee(l)&&(l=l.current),l=l||document.body;let c=null;e&&(c=document.createElement("div"),c.id=e,l.appendChild(c));const d=document.createElement("div");d.id=a,d.setAttribute(Ih,""),l=c||l,l.appendChild(d),i.current=d,s(d)},[e,n,a,o]),r}function H1(t){let{children:e,id:n,root:r=null,preserveTabOrder:s=!0}=t;const a=z1({id:n,root:r}),[o,i]=B.useState(null),l=B.useRef(null),c=B.useRef(null),d=B.useRef(null),u=B.useRef(null),f=!!o&&!o.modal&&o.open&&s&&!!(r||a);return B.useEffect(()=>{if(!a||!s||o!=null&&o.modal)return;function h(m){a&&ia(m)&&(m.type==="focusin"?W1:F1)(a)}return a.addEventListener("focusin",h,!0),a.addEventListener("focusout",h,!0),()=>{a.removeEventListener("focusin",h,!0),a.removeEventListener("focusout",h,!0)}},[a,s,o==null?void 0:o.modal]),B.createElement(jh.Provider,{value:B.useMemo(()=>({preserveTabOrder:s,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:u,portalNode:a,setFocusManagerState:i}),[s,a])},f&&a&&B.createElement(Lo,{"data-type":"outside",ref:l,onFocus:h=>{if(ia(h,a)){var m;(m=d.current)==null||m.focus()}else{const p=Th()||(o==null?void 0:o.refs.domReference.current);p==null||p.focus()}}}),f&&a&&B.createElement("span",{"aria-owns":a.id,style:mc}),a&&rf.createPortal(e,a),f&&a&&B.createElement(Lo,{"data-type":"outside",ref:c,onFocus:h=>{if(ia(h,a)){var m;(m=u.current)==null||m.focus()}else{const p=Ph()||(o==null?void 0:o.refs.domReference.current);p==null||p.focus(),o!=null&&o.closeOnFocusOut&&(o==null||o.onOpenChange(!1,h.nativeEvent))}}}))}const Ah=()=>B.useContext(jh),Y1=20;let Er=[];function pc(t){Er=Er.filter(n=>n.isConnected);let e=t;if(!(!e||Sr(e)==="body")){if(!b1(e,oa())){const n=To(e,oa())[0];if(!n)return;e=n}Er.push(e),Er.length>Y1&&(Er=Er.slice(-20))}}function Rh(){return Er.slice().reverse().find(t=>t.isConnected)}const V1=B.forwardRef(function(e,n){return B.createElement("button",sa({},e,{type:"button",ref:n,tabIndex:-1,style:mc}))});function Lh(t){const{context:e,children:n,disabled:r=!1,order:s=["content"],guards:a=!0,initialFocus:o=0,returnFocus:i=!0,modal:l=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:d=!0}=t,{open:u,refs:f,nodeId:h,onOpenChange:m,events:p,dataRef:b,elements:{domReference:v,floating:x}}=e,k=typeof o=="number"&&o<0,w=Jf(v)&&k,y=A1()?a:!0,S=mn(s),N=mn(o),M=mn(i),T=aa(),E=Ah(),z=B.useRef(null),L=B.useRef(null),O=B.useRef(!1),C=B.useRef(!1),P=E!=null,F=B.useCallback(function(j){return j===void 0&&(j=x),j?To(j,oa()):[]},[x]),U=B.useCallback(j=>{const H=F(j);return S.current.map(R=>v&&R==="reference"?v:x&&R==="floating"?x:H).filter(Boolean).flat()},[v,x,S,F]);B.useEffect(()=>{if(r||!l)return;function j(R){if(R.key==="Tab"){$e(x,un(xt(x)))&&F().length===0&&!w&&ft(R);const A=U(),I=rr(R);S.current[0]==="reference"&&I===v&&(ft(R),R.shiftKey?Rn(A[A.length-1]):Rn(A[1])),S.current[1]==="floating"&&I===x&&R.shiftKey&&(ft(R),Rn(A[0]))}}const H=xt(x);return H.addEventListener("keydown",j),()=>{H.removeEventListener("keydown",j)}},[r,v,x,l,S,w,F,U]),B.useEffect(()=>{if(r||!d)return;function j(){C.current=!0,setTimeout(()=>{C.current=!1})}function H(R){const A=R.relatedTarget;queueMicrotask(()=>{const I=!($e(v,A)||$e(x,A)||$e(A,x)||$e(E==null?void 0:E.portalNode,A)||A!=null&&A.hasAttribute(Dr("focus-guard"))||T&&(Mr(T.nodesRef.current,h).find(D=>{var W,Z;return $e((W=D.context)==null?void 0:W.elements.floating,A)||$e((Z=D.context)==null?void 0:Z.elements.domReference,A)})||j1(T.nodesRef.current,h).find(D=>{var W,Z;return((W=D.context)==null?void 0:W.elements.floating)===A||((Z=D.context)==null?void 0:Z.elements.domReference)===A})));A&&I&&!C.current&&A!==Rh()&&(O.current=!0,m(!1,R))})}if(x&&ut(v))return v.addEventListener("focusout",H),v.addEventListener("pointerdown",j),!l&&x.addEventListener("focusout",H),()=>{v.removeEventListener("focusout",H),v.removeEventListener("pointerdown",j),!l&&x.removeEventListener("focusout",H)}},[r,v,x,l,h,T,E,m,d]),B.useEffect(()=>{var j;if(r)return;const H=Array.from((E==null||(j=E.portalNode)==null?void 0:j.querySelectorAll("["+Dr("portal")+"]"))||[]);if(x){const R=[x,...H,z.current,L.current,S.current.includes("reference")||w?v:null].filter(I=>I!=null),A=l||w?Mh(R,y,!y):Mh(R);return()=>{A()}}},[r,v,x,l,S,E,w,y]),je(()=>{if(r||!x)return;const j=xt(x),H=un(j);queueMicrotask(()=>{const R=U(x),A=N.current,I=(typeof A=="number"?R[A]:A.current)||x,D=$e(x,H);!k&&!D&&u&&Rn(I,{preventScroll:I===x})})},[r,u,x,k,U,N]),je(()=>{if(r||!x)return;let j=!1;const H=xt(x),R=un(H),A=b.current;pc(R);function I(D){let{reason:W,event:Z,nested:G}=D;W==="escape-key"&&f.domReference.current&&pc(f.domReference.current),W==="hover"&&Z.type==="mouseleave"&&(O.current=!0),W==="outside-press"&&(G?(O.current=!1,j=!0):O.current=!(Qf(Z)||Zl(Z)))}return p.on("openchange",I),()=>{p.off("openchange",I);const D=un(H),W=$e(x,D)||T&&Mr(T.nodesRef.current,h).some(J=>{var ee;return $e((ee=J.context)==null?void 0:ee.elements.floating,D)});(W||A.openEvent&&["click","mousedown"].includes(A.openEvent.type))&&f.domReference.current&&pc(f.domReference.current);const G=Rh();M.current&&!O.current&&ut(G)&&(!(G!==D&&D!==H.body)||W)&&Rn(G,{cancelPrevious:!1,preventScroll:j})}},[r,x,M,b,f,p,T,h]),je(()=>{if(!(r||!E))return E.setFocusManagerState({modal:l,closeOnFocusOut:d,open:u,onOpenChange:m,refs:f}),()=>{E.setFocusManagerState(null)}},[r,E,l,u,m,f,d]),je(()=>{if(r||!x||typeof MutationObserver!="function"||k)return;const j=()=>{const R=x.getAttribute("tabindex");S.current.includes("floating")||un(xt(x))!==f.domReference.current&&F().length===0?R!=="0"&&x.setAttribute("tabindex","0"):R!=="-1"&&x.setAttribute("tabindex","-1")};j();const H=new MutationObserver(j);return H.observe(x,{childList:!0,subtree:!0,attributes:!0}),()=>{H.disconnect()}},[r,x,f,S,F,k]);function Q(j){return r||!c||!l?null:B.createElement(V1,{ref:j==="start"?z:L,onClick:H=>m(!1,H.nativeEvent)},typeof c=="string"?c:"Dismiss")}const $=!r&&y&&(P||l);return B.createElement(B.Fragment,null,$&&B.createElement(Lo,{"data-type":"inside",ref:E==null?void 0:E.beforeInsideRef,onFocus:j=>{if(l){const R=U();Rn(s[0]==="reference"?R[0]:R[R.length-1])}else if(E!=null&&E.preserveTabOrder&&E.portalNode)if(O.current=!1,ia(j,E.portalNode)){const R=Ph()||v;R==null||R.focus()}else{var H;(H=E.beforeOutsideRef.current)==null||H.focus()}}}),!w&&Q("start"),n,Q("end"),$&&B.createElement(Lo,{"data-type":"inside",ref:E==null?void 0:E.afterInsideRef,onFocus:j=>{if(l)Rn(U()[0]);else if(E!=null&&E.preserveTabOrder&&E.portalNode)if(d&&(O.current=!0),ia(j,E.portalNode)){const R=Th()||v;R==null||R.focus()}else{var H;(H=E.afterOutsideRef.current)==null||H.focus()}}}))}const bc=new Set,U1=B.forwardRef(function(e,n){let{lockScroll:r=!1,...s}=e;const a=jo();return je(()=>{if(!r)return;bc.add(a);const o=/iP(hone|ad|od)|iOS/.test(Ql()),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,f=i.top?parseFloat(i.top):window.pageYOffset;if(i.overflow="hidden",d&&(i[c]=d+"px"),o){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:-(f-Math.floor(b))+"px",left:-(u-Math.floor(p))+"px",right:"0"})}return()=>{bc.delete(a),bc.size===0&&(Object.assign(i,{overflow:"",[c]:""}),o&&(Object.assign(i,{position:"",top:"",left:"",right:""}),window.scrollTo(u,f)))}},[a,r]),B.createElement("div",sa({ref:n},s,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...s.style}}))});function Fh(t){return ut(t.target)&&t.target.tagName==="BUTTON"}function Wh(t){return ec(t)}function Bh(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:s,elements:{domReference:a}}=t,{enabled:o=!0,event:i="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:d=!0}=e,u=B.useRef(),f=B.useRef(!1);return B.useMemo(()=>o?{reference:{onPointerDown(h){u.current=h.pointerType},onMouseDown(h){h.button===0&&(vo(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}vo(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||Fh(h))&&(h.key===" "&&!Wh(a)&&(h.preventDefault(),f.current=!0),h.key==="Enter"&&r(!(n&&l),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!d||Fh(h)||Wh(a)||h.key===" "&&f.current&&(f.current=!1,r(!(n&&l),h.nativeEvent,"click"))}}}:{},[o,s,i,c,d,a,l,n,r])}const X1={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},K1={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},zh=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 Hh(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,nodeId:s,elements:{reference:a,domReference:o,floating:i},dataRef:l}=t,{enabled:c=!0,escapeKey:d=!0,outsidePress:u=!0,outsidePressEvent:f="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:p=!1,bubbles:b,capture:v}=e,x=aa(),k=gn(typeof u=="function"?u:()=>!1),w=typeof u=="function"?k:u,y=B.useRef(!1),S=B.useRef(!1),{escapeKey:N,outsidePress:M}=zh(b),{escapeKey:T,outsidePress:E}=zh(v),z=gn(P=>{if(!n||!c||!d||P.key!=="Escape")return;const F=x?Mr(x.nodesRef.current,s):[];if(!N&&(P.stopPropagation(),F.length>0)){let U=!0;if(F.forEach(Q=>{var $;if(($=Q.context)!=null&&$.open&&!Q.context.dataRef.current.__escapeKeyBubbles){U=!1;return}}),!U)return}r(!1,l2(P)?P.nativeEvent:P,"escape-key")}),L=gn(P=>{var F;const U=()=>{var Q;z(P),(Q=rr(P))==null||Q.removeEventListener("keydown",U)};(F=rr(P))==null||F.addEventListener("keydown",U)}),O=gn(P=>{const F=y.current;y.current=!1;const U=S.current;if(S.current=!1,f==="click"&&U||F||typeof w=="function"&&!w(P))return;const Q=rr(P),$="["+Dr("inert")+"]",j=xt(i).querySelectorAll($);let H=Ee(Q)?Q:null;for(;H&&!tr(H);){const I=In(H);if(tr(I)||!Ee(I))break;H=I}if(j.length&&Ee(Q)&&!c2(Q)&&!$e(Q,i)&&Array.from(j).every(I=>!$e(H,I)))return;if(ut(Q)&&i){const I=Q.clientWidth>0&&Q.scrollWidth>Q.clientWidth,D=Q.clientHeight>0&&Q.scrollHeight>Q.clientHeight;let W=D&&P.offsetX>Q.clientWidth;if(D&&Gt(Q).direction==="rtl"&&(W=P.offsetX<=Q.offsetWidth-Q.clientWidth),W||I&&P.offsetY>Q.clientHeight)return}const R=x&&Mr(x.nodesRef.current,s).some(I=>{var D;return $l(P,(D=I.context)==null?void 0:D.elements.floating)});if($l(P,i)||$l(P,o)||R)return;const A=x?Mr(x.nodesRef.current,s):[];if(A.length>0){let I=!0;if(A.forEach(D=>{var W;if((W=D.context)!=null&&W.open&&!D.context.dataRef.current.__outsidePressBubbles){I=!1;return}}),!I)return}r(!1,P,"outside-press")}),C=gn(P=>{var F;const U=()=>{var Q;O(P),(Q=rr(P))==null||Q.removeEventListener(f,U)};(F=rr(P))==null||F.addEventListener(f,U)});return B.useEffect(()=>{if(!n||!c)return;l.current.__escapeKeyBubbles=N,l.current.__outsidePressBubbles=M;function P(Q){r(!1,Q,"ancestor-scroll")}const F=xt(i);d&&F.addEventListener("keydown",T?L:z,T),w&&F.addEventListener(f,E?C:O,E);let U=[];return p&&(Ee(o)&&(U=nr(o)),Ee(i)&&(U=U.concat(nr(i))),!Ee(a)&&a&&a.contextElement&&(U=U.concat(nr(a.contextElement)))),U=U.filter(Q=>{var $;return Q!==(($=F.defaultView)==null?void 0:$.visualViewport)}),U.forEach(Q=>{Q.addEventListener("scroll",P,{passive:!0})}),()=>{d&&F.removeEventListener("keydown",T?L:z,T),w&&F.removeEventListener(f,E?C:O,E),U.forEach(Q=>{Q.removeEventListener("scroll",P)})}},[l,i,o,a,d,w,f,n,r,p,c,N,M,z,T,L,O,E,C]),B.useEffect(()=>{y.current=!1},[w,f]),B.useMemo(()=>c?{reference:{onKeyDown:z,[X1[m]]:P=>{h&&r(!1,P.nativeEvent,"reference-press")}},floating:{onKeyDown:z,onMouseDown(){S.current=!0},onMouseUp(){S.current=!0},[K1[f]]:()=>{y.current=!0}}}:{},[c,h,f,m,r,z])}let yc;process.env.NODE_ENV!=="production"&&(yc=new Set);function Yh(t){var e;t===void 0&&(t={});const{open:n=!1,onOpenChange:r,nodeId:s}=t;if(process.env.NODE_ENV!=="production"){var a;const M="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((a=t.elements)!=null&&a.reference&&!Ee(t.elements.reference)){var o;if(!((o=yc)!=null&&o.has(M))){var i;(i=yc)==null||i.add(M),console.error(M)}}}const[l,c]=B.useState(null),d=((e=t.elements)==null?void 0:e.reference)||l,u=X2(t),f=aa(),h=Io()!=null,m=gn((M,T,E)=>{M&&(b.current.openEvent=T),v.emit("openchange",{open:M,event:T,reason:E,nested:h}),r==null||r(M,T,E)}),p=B.useRef(null),b=B.useRef({}),v=B.useState(()=>E1())[0],x=jo(),k=B.useCallback(M=>{const T=Ee(M)?{getBoundingClientRect:()=>M.getBoundingClientRect(),contextElement:M}:M;u.refs.setReference(T)},[u.refs]),w=B.useCallback(M=>{(Ee(M)||M===null)&&(p.current=M,c(M)),(Ee(u.refs.reference.current)||u.refs.reference.current===null||M!==null&&!Ee(M))&&u.refs.setReference(M)},[u.refs]),y=B.useMemo(()=>({...u.refs,setReference:w,setPositionReference:k,domReference:p}),[u.refs,w,k]),S=B.useMemo(()=>({...u.elements,domReference:d}),[u.elements,d]),N=B.useMemo(()=>({...u,refs:y,elements:S,dataRef:b,nodeId:s,floatingId:x,events:v,open:n,onOpenChange:m}),[u,s,x,v,n,m,y,S]);return je(()=>{const M=f==null?void 0:f.nodesRef.current.find(T=>T.id===s);M&&(M.context=N)}),B.useMemo(()=>({...u,context:N,refs:y,elements:S}),[u,y,S,N])}function G1(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,events:s,refs:a,elements:{domReference:o}}=t,{enabled:i=!0,visibleOnly:l=!0}=e,c=B.useRef(!1),d=B.useRef(),u=B.useRef(!0);return B.useEffect(()=>{if(!i)return;const f=Ct(o);function h(){!n&&ut(o)&&o===un(xt(o))&&(c.current=!0)}function m(){u.current=!0}return f.addEventListener("blur",h),f.addEventListener("keydown",m,!0),()=>{f.removeEventListener("blur",h),f.removeEventListener("keydown",m,!0)}},[o,n,i]),B.useEffect(()=>{if(!i)return;function f(h){let{reason:m}=h;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return s.on("openchange",f),()=>{s.off("openchange",f)}},[s,i]),B.useEffect(()=>()=>{clearTimeout(d.current)},[]),B.useMemo(()=>i?{reference:{onPointerDown(f){Zl(f.nativeEvent)||(u.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const h=rr(f.nativeEvent);if(l&&Ee(h))try{if(Jl()&&Zf())throw Error();if(!h.matches(":focus-visible"))return}catch{if(!u.current&&!ec(h))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const h=f.relatedTarget,m=Ee(h)&&h.hasAttribute(Dr("focus-guard"))&&h.getAttribute("data-type")==="outside";d.current=window.setTimeout(()=>{const p=un(o?o.ownerDocument:document);!h&&p===o||$e(a.floating.current,p)||$e(o,p)||m||r(!1,f.nativeEvent,"focus")})}}}:{},[i,l,o,a,r])}const Vh="active",Uh="selected";function wc(t,e,n){const r=new Map,s=n==="item";let a=t;if(s&&t){const{[Vh]:o,[Uh]:i,...l}=t;a=l}return{...n==="floating"&&{tabIndex:-1},...a,...e.map(o=>{const i=o?o[n]:null;return typeof i=="function"?t?i(t):null:i}).concat(t).reduce((o,i)=>(i&&Object.entries(i).forEach(l=>{let[c,d]=l;if(!(s&&[Vh,Uh].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof d=="function"){var u;(u=r.get(c))==null||u.push(d),o[c]=function(){for(var f,h=arguments.length,m=new Array(h),p=0;p<h;p++)m[p]=arguments[p];return(f=r.get(c))==null?void 0:f.map(b=>b(...m)).find(b=>b!==void 0)}}}else o[c]=d}),o),{})}}function Xh(t){t===void 0&&(t=[]);const e=t,n=B.useCallback(a=>wc(a,t,"reference"),e),r=B.useCallback(a=>wc(a,t,"floating"),e),s=B.useCallback(a=>wc(a,t,"item"),t.map(a=>a==null?void 0:a.item));return B.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:s}),[n,r,s])}let Kh=!1;function Fo(t,e,n){switch(t){case"vertical":return e;case"horizontal":return n;default:return e||n}}function Gh(t,e){return Fo(e,t===dc||t===na,t===hs||t===gs)}function vc(t,e,n){return Fo(e,t===na,n?t===hs:t===gs)||t==="Enter"||t===" "||t===""}function Q1(t,e,n){return Fo(e,n?t===hs:t===gs,t===na)}function Qh(t,e,n){return Fo(e,n?t===gs:t===hs,t===dc)}function Z1(t,e){const{open:n,onOpenChange:r,refs:s,elements:{domReference:a,floating:o}}=t,{listRef:i,activeIndex:l,onNavigate:c=()=>{},enabled:d=!0,selectedIndex:u=null,allowEscape:f=!1,loop:h=!1,nested:m=!1,rtl:p=!1,virtual:b=!1,focusItemOnOpen:v="auto",focusItemOnHover:x=!0,openOnArrowKeyDown:k=!0,disabledIndices:w=void 0,orientation:y="vertical",cols:S=1,scrollItemIntoView:N=!0,virtualItemRef:M,itemSizes:T,dense:E=!1}=e;process.env.NODE_ENV!=="production"&&(f&&(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(" "))),y==="vertical"&&S>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const z=Io(),L=aa(),O=gn(c),C=B.useRef(v),P=B.useRef(u??-1),F=B.useRef(null),U=B.useRef(!0),Q=B.useRef(O),$=B.useRef(!!o),j=B.useRef(!1),H=B.useRef(!1),R=mn(w),A=mn(n),I=mn(N),[D,W]=B.useState(),[Z,G]=B.useState(),J=gn(function(Y,se,ne){ne===void 0&&(ne=!1);const ce=Y.current[se.current];ce&&(b?(W(ce.id),L==null||L.events.emit("virtualfocus",ce),M&&(M.current=ce)):Rn(ce,{preventScroll:!0,sync:Zf()&&Jl()?Kh||j.current:!1}),requestAnimationFrame(()=>{const ge=I.current;ge&&ce&&(ne||!U.current)&&(ce.scrollIntoView==null||ce.scrollIntoView(typeof ge=="boolean"?{block:"nearest",inline:"nearest"}:ge))}))});je(()=>{document.createElement("div").focus({get preventScroll(){return Kh=!0,!1}})},[]),je(()=>{d&&(n&&o?C.current&&u!=null&&(H.current=!0,P.current=u,O(u)):$.current&&(P.current=-1,Q.current(null)))},[d,n,o,u,O]),je(()=>{if(d&&n&&o)if(l==null){if(j.current=!1,u!=null)return;if($.current&&(P.current=-1,J(i,P)),!$.current&&C.current&&(F.current!=null||C.current===!0&&F.current==null)){let Y=0;const se=()=>{i.current[0]==null?(Y<2&&(Y?requestAnimationFrame:queueMicrotask)(se),Y++):(P.current=F.current==null||vc(F.current,y,p)||m?uc(i,R.current):kh(i,R.current),F.current=null,O(P.current))};se()}}else ra(i,l)||(P.current=l,J(i,P,H.current),H.current=!1)},[d,n,o,l,u,m,i,y,p,O,J,R]),je(()=>{var Y;if(!d||o||!L||b||!$.current)return;const se=L.nodesRef.current,ne=(Y=se.find(ue=>ue.id===z))==null||(Y=Y.context)==null?void 0:Y.elements.floating,ce=un(xt(o)),ge=se.some(ue=>ue.context&&$e(ue.context.elements.floating,ce));ne&&!ge&&U.current&&ne.focus({preventScroll:!0})},[d,o,L,z,b]),je(()=>{if(!d||!L||!b||z)return;function Y(se){G(se.id),M&&(M.current=se)}return L.events.on("virtualfocus",Y),()=>{L.events.off("virtualfocus",Y)}},[d,L,b,z,M]),je(()=>{Q.current=O,$.current=!!o}),je(()=>{n||(F.current=null)},[n]);const ee=l!=null,re=B.useMemo(()=>{function Y(ne){if(!n)return;const ce=i.current.indexOf(ne);ce!==-1&&O(ce)}return{onFocus(ne){let{currentTarget:ce}=ne;Y(ce)},onClick:ne=>{let{currentTarget:ce}=ne;return ce.focus({preventScroll:!0})},...x&&{onMouseMove(ne){let{currentTarget:ce}=ne;Y(ce)},onPointerLeave(ne){let{pointerType:ce}=ne;!U.current||ce==="touch"||(P.current=-1,J(i,P),O(null),b||Rn(s.floating.current,{preventScroll:!0}))}}}},[n,s,J,x,i,O,b]);return B.useMemo(()=>{if(!d)return{};const Y=R.current;function se(ae){if(U.current=!1,j.current=!0,!A.current&&ae.currentTarget===s.floating.current)return;if(m&&Qh(ae.key,y,p)){ft(ae),r(!1,ae.nativeEvent,"list-navigation"),ut(a)&&!b&&a.focus();return}const Ye=P.current,pe=uc(i,Y),ze=kh(i,Y);if(ae.key==="Home"&&(ft(ae),P.current=pe,O(P.current)),ae.key==="End"&&(ft(ae),P.current=ze,O(P.current)),S>1){const Xe=T||Array.from({length:i.current.length},()=>({width:1,height:1})),qe=v1(Xe,S,E),Vt=qe.findIndex(Xt=>Xt!=null&&!(Y!=null&&Y.includes(Xt))),Ut=qe.reduce((Xt,vr,Kt)=>vr!=null&&!(Y!=null&&Y.includes(vr))?Kt:Xt,-1);if(P.current=qe[w1({current:qe.map(Xt=>Xt!=null?i.current[Xt]:null)},{event:ae,orientation:y,loop:h,cols:S,disabledIndices:k1([...Y||[],void 0],qe),minIndex:Vt,maxIndex:Ut,prevIndex:x1(P.current,Xe,qe,S,ae.key===na?"bl":ae.key===gs?"tr":"tl"),stopEvent:!0})],O(P.current),y==="both")return}if(Gh(ae.key,y)){if(ft(ae),n&&!b&&un(ae.currentTarget.ownerDocument)===ae.currentTarget){P.current=vc(ae.key,y,p)?pe:ze,O(P.current);return}vc(ae.key,y,p)?h?P.current=Ye>=ze?f&&Ye!==i.current.length?-1:pe:pt(i,{startingIndex:Ye,disabledIndices:Y}):P.current=Math.min(ze,pt(i,{startingIndex:Ye,disabledIndices:Y})):h?P.current=Ye<=pe?f&&Ye!==-1?i.current.length:ze:pt(i,{startingIndex:Ye,decrement:!0,disabledIndices:Y}):P.current=Math.max(pe,pt(i,{startingIndex:Ye,decrement:!0,disabledIndices:Y})),ra(i,P.current)?O(null):O(P.current)}}function ne(ae){v==="auto"&&Qf(ae.nativeEvent)&&(C.current=!0)}function ce(ae){C.current=v,v==="auto"&&Zl(ae.nativeEvent)&&(C.current=!0)}const ge=b&&n&&ee&&{"aria-activedescendant":Z||D},ue=i.current.find(ae=>(ae==null?void 0:ae.id)===D);return{reference:{...ge,onKeyDown(ae){U.current=!1;const Ye=ae.key.indexOf("Arrow")===0,pe=Q1(ae.key,y,p),ze=Qh(ae.key,y,p),Xe=Gh(ae.key,y),qe=(m?pe:Xe)||ae.key==="Enter"||ae.key.trim()==="";if(b&&n){const vr=L==null?void 0:L.nodesRef.current.find(Rl=>Rl.parentId==null),Kt=L&&vr?I1(L.nodesRef.current,vr.id):null;if(Ye&&Kt&&M){const Rl=new KeyboardEvent("keydown",{key:ae.key,bubbles:!0});if(pe||ze){var Vt,Ut;const gL=((Vt=Kt.context)==null?void 0:Vt.elements.domReference)===ae.currentTarget,Gv=ze&&!gL?(Ut=Kt.context)==null?void 0:Ut.elements.domReference:pe?ue:null;Gv&&(ft(ae),Gv.dispatchEvent(Rl),G(void 0))}if(Xe&&Kt.context&&Kt.context.open&&Kt.parentId&&ae.currentTarget!==Kt.context.elements.domReference){var Xt;ft(ae),(Xt=Kt.context.elements.domReference)==null||Xt.dispatchEvent(Rl);return}}return se(ae)}if(!(!n&&!k&&Ye)){if(qe&&(F.current=m&&Xe?null:ae.key),m){pe&&(ft(ae),n?(P.current=uc(i,Y),O(P.current)):r(!0,ae.nativeEvent,"list-navigation"));return}Xe&&(u!=null&&(P.current=u),ft(ae),!n&&k?r(!0,ae.nativeEvent,"list-navigation"):se(ae),n&&O(P.current))}},onFocus(){n&&O(null)},onPointerDown:ce,onMouseDown:ne,onClick:ne},floating:{"aria-orientation":y==="both"?void 0:y,...!Jf(a)&&ge,onKeyDown:se,onPointerMove(){U.current=!0}},item:re}},[a,s,D,Z,R,A,i,d,y,p,b,n,ee,m,u,k,f,S,h,v,O,r,re,L,M,T,E])}const J1=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Zh(t,e){var n;e===void 0&&(e={});const{open:r,floatingId:s}=t,{enabled:a=!0,role:o="dialog"}=e,i=(n=J1.get(o))!=null?n:o,l=jo(),d=Io()!=null;return B.useMemo(()=>{if(!a)return{};const u={id:s,...i&&{role:i}};return i==="tooltip"||o==="label"?{reference:{["aria-"+(o==="label"?"labelledby":"describedby")]:r?s:void 0},floating:u}:{reference:{"aria-expanded":r?"true":"false","aria-haspopup":i==="alertdialog"?"dialog":i,"aria-controls":r?s:void 0,...i==="listbox"&&{role:"combobox"},...i==="menu"&&{id:l},...i==="menu"&&d&&{role:"menuitem"},...o==="select"&&{"aria-autocomplete":"none"},...o==="combobox"&&{"aria-autocomplete":"list"}},floating:{...u,...i==="menu"&&{"aria-labelledby":l}},item(f){let{active:h,selected:m}=f;const p={role:"option",...h&&{id:s+"-option"}};switch(o){case"select":return{...p,"aria-selected":h&&m};case"combobox":return{...p,...h&&{"aria-selected":!0}}}return{}}}},[a,o,i,r,s,l,d])}function q1(t,e){var n;const{open:r,dataRef:s}=t,{listRef:a,activeIndex:o,onMatch:i,onTypingChange:l,enabled:c=!0,findMatch:d=null,resetMs:u=750,ignoreKeys:f=[],selectedIndex:h=null}=e,m=B.useRef(),p=B.useRef(""),b=B.useRef((n=h??o)!=null?n:-1),v=B.useRef(null),x=gn(i),k=gn(l),w=mn(d),y=mn(f);return je(()=>{r&&(clearTimeout(m.current),v.current=null,p.current="")},[r]),je(()=>{if(r&&p.current===""){var S;b.current=(S=h??o)!=null?S:-1}},[r,h,o]),B.useMemo(()=>{if(!c)return{};function S(T){T?s.current.typing||(s.current.typing=T,k(T)):s.current.typing&&(s.current.typing=T,k(T))}function N(T,E,z){const L=w.current?w.current(E,z):E.find(O=>(O==null?void 0:O.toLocaleLowerCase().indexOf(z.toLocaleLowerCase()))===0);return L?T.indexOf(L):-1}function M(T){const E=a.current;if(p.current.length>0&&p.current[0]!==" "&&(N(E,E,p.current)===-1?S(!1):T.key===" "&&ft(T)),E==null||y.current.includes(T.key)||T.key.length!==1||T.ctrlKey||T.metaKey||T.altKey)return;r&&T.key!==" "&&(ft(T),S(!0)),E.every(C=>{var P,F;return C?((P=C[0])==null?void 0:P.toLocaleLowerCase())!==((F=C[1])==null?void 0:F.toLocaleLowerCase()):!0})&&p.current===T.key&&(p.current="",b.current=v.current),p.current+=T.key,clearTimeout(m.current),m.current=setTimeout(()=>{p.current="",b.current=v.current,S(!1)},u);const L=b.current,O=N(E,[...E.slice((L||0)+1),...E.slice(0,(L||0)+1)],p.current);O!==-1?(x(O),v.current=O):T.key!==" "&&(p.current="",S(!1))}return{reference:{onKeyDown:M},floating:{onKeyDown:M,onKeyUp(T){T.key===" "&&S(!1)}}}},[c,r,s,a,u,y,w,x,k])}function Jh(t,e){const[n,r]=t;let s=!1;const a=e.length;for(let o=0,i=a-1;o<a;i=o++){const[l,c]=e[o]||[0,0],[d,u]=e[i]||[0,0];c>=r!=u>=r&&n<=(d-l)*(r-c)/(u-c)+l&&(s=!s)}return s}function $1(t,e){return t[0]>=e.x&&t[0]<=e.x+e.width&&t[1]>=e.y&&t[1]<=e.y+e.height}function e_(t){t===void 0&&(t={});const{buffer:e=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=t;let s,a=!1,o=null,i=null,l=performance.now();function c(u,f){const h=performance.now(),m=h-l;if(o===null||i===null||m===0)return o=u,i=f,l=h,null;const p=u-o,b=f-i,x=Math.sqrt(p*p+b*b)/m;return o=u,i=f,l=h,x}const d=u=>{let{x:f,y:h,placement:m,elements:p,onClose:b,nodeId:v,tree:x}=u;return function(w){function y(){clearTimeout(s),b()}if(clearTimeout(s),!p.domReference||!p.floating||m==null||f==null||h==null)return;const{clientX:S,clientY:N}=w,M=[S,N],T=rr(w),E=w.type==="mouseleave",z=$e(p.floating,T),L=$e(p.domReference,T),O=p.domReference.getBoundingClientRect(),C=p.floating.getBoundingClientRect(),P=m.split("-")[0],F=f>C.right-C.width/2,U=h>C.bottom-C.height/2,Q=$1(M,O),$=C.width>O.width,j=C.height>O.height,H=($?O:C).left,R=($?O:C).right,A=(j?O:C).top,I=(j?O:C).bottom;if(z&&(a=!0,!E))return;if(L&&(a=!1),L&&!E){a=!0;return}if(E&&Ee(w.relatedTarget)&&$e(p.floating,w.relatedTarget)||x&&Mr(x.nodesRef.current,v).some(Z=>{let{context:G}=Z;return G==null?void 0:G.open}))return;if(P==="top"&&h>=O.bottom-1||P==="bottom"&&h<=O.top+1||P==="left"&&f>=O.right-1||P==="right"&&f<=O.left+1)return y();let D=[];switch(P){case"top":D=[[H,O.top+1],[H,C.bottom-1],[R,C.bottom-1],[R,O.top+1]];break;case"bottom":D=[[H,C.top+1],[H,O.bottom-1],[R,O.bottom-1],[R,C.top+1]];break;case"left":D=[[C.right-1,I],[C.right-1,A],[O.left+1,A],[O.left+1,I]];break;case"right":D=[[O.right-1,I],[O.right-1,A],[C.left+1,A],[C.left+1,I]];break}function W(Z){let[G,J]=Z;switch(P){case"top":{const ee=[$?G+e/2:F?G+e*4:G-e*4,J+e+1],re=[$?G-e/2:F?G+e*4:G-e*4,J+e+1],Y=[[C.left,F||$?C.bottom-e:C.top],[C.right,F?$?C.bottom-e:C.top:C.bottom-e]];return[ee,re,...Y]}case"bottom":{const ee=[$?G+e/2:F?G+e*4:G-e*4,J-e],re=[$?G-e/2:F?G+e*4:G-e*4,J-e],Y=[[C.left,F||$?C.top+e:C.bottom],[C.right,F?$?C.top+e:C.bottom:C.top+e]];return[ee,re,...Y]}case"left":{const ee=[G+e+1,j?J+e/2:U?J+e*4:J-e*4],re=[G+e+1,j?J-e/2:U?J+e*4:J-e*4];return[...[[U||j?C.right-e:C.left,C.top],[U?j?C.right-e:C.left:C.right-e,C.bottom]],ee,re]}case"right":{const ee=[G-e,j?J+e/2:U?J+e*4:J-e*4],re=[G-e,j?J-e/2:U?J+e*4:J-e*4],Y=[[U||j?C.left+e:C.right,C.top],[U?j?C.left+e:C.right:C.left+e,C.bottom]];return[ee,re,...Y]}}}if(!Jh([S,N],D)){if(a&&!Q)return y();if(!E&&r){const Z=c(w.clientX,w.clientY);if(Z!==null&&Z<.1)return y()}Jh([S,N],W([f,h]))?!a&&r&&(s=window.setTimeout(y,40)):y()}}};return d.__options={blockPointerEvents:n},d}const t_=({arrowRef:t,placement:e})=>{const n=[];return n.push(G2(8)),n.push(e==="auto"?J2():Z2()),n.push(Q2({padding:8})),t!=null&&t.current&&n.push(q2({element:t.current})),n},n_=({placement:t})=>t==="auto"?void 0:t,r_=({placement:t})=>({top:"bottom",right:"left",bottom:"top",left:"right"})[t.split("-")[0]],qh=({open:t,arrowRef:e,placement:n="top",setOpen:r})=>Yh({placement:n_({placement:n}),open:t,onOpenChange:r,whileElementsMounted:fh,middleware:t_({placement:n,arrowRef:e})}),$h=({context:t,trigger:e,role:n="tooltip",interactions:r=[]})=>Xh([Bh(t,{enabled:e==="click"}),N1(t,{enabled:e==="hover",handleClose:e_()}),Hh(t),Zh(t,{role:n}),...r]),eg=_.createContext(void 0);function xc(){const t=_.useContext(eg);if(!t)throw new Error("useDropdownContext should be used within the DropdownContext provider!");return t}const kc=({className:t,theme:e={},...n})=>{const{theme:r}=xc(),s=e.divider??r.floating.divider;return g.jsx("div",{className:X(s,t),...n})},tg=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=xc(),a=n.header??s.floating.header;return g.jsxs(g.Fragment,{children:[g.jsx("div",{className:X(a,e),...r,children:t}),g.jsx(kc,{})]})},_c=_.forwardRef(({children:t,className:e,icon:n,onClick:r,theme:s={},...a},o)=>{const{ref:i,index:l}=C1({label:typeof t=="string"?t:void 0}),c=xh([o,i]),{theme:d,activeIndex:u,dismissOnClick:f,getItemProps:h,handleSelect:m}=xc(),p=u===l,b=te(d.floating.item,s),v=a;return g.jsx("li",{role:"menuitem",className:b.container,children:g.jsxs(zl,{ref:c,className:X(b.base,e),...v,...h({onClick:()=>{r==null||r(),f&&m(null)}}),tabIndex:p?0:-1,children:[n&&g.jsx(n,{className:b.icon}),t]})})});_c.displayName="DropdownItem";const s_={top:yx,right:ff,bottom:uf,left:bx},a_=({refs:t,children:e,inline:n,theme:r,disabled:s,setButtonWidth:a,getReferenceProps:o,renderTrigger:i,...l})=>{const c=t.reference,d=o();if(_.useEffect(()=>{c.current&&(a==null||a(c.current.clientWidth))},[c,a]),i){const u=i(r);return _.cloneElement(u,{ref:t.setReference,disabled:s,...d,...u.props})}return n?g.jsx("button",{type:"button",ref:t.setReference,className:r==null?void 0:r.inlineWrapper,disabled:s,...d,children:e}):g.jsx(Zs,{...l,disabled:s,type:"button",ref:t.setReference,...d,children:e})},ng=({children:t,className:e,dismissOnClick:n=!0,theme:r={},renderTrigger:s,...a})=>{const[o,i]=_.useState(!1),[l,c]=_.useState(null),[d,u]=_.useState(null),[f,h]=_.useState(void 0),m=_.useRef([]),p=_.useRef([]),b=te(fe().dropdown,r),v=a,x=a["data-testid"]||"flowbite-dropdown-target",{placement:k=a.inline?"bottom-start":"bottom",trigger:w="click",label:y,inline:S,arrowIcon:N=!0,...M}=v,T=_.useCallback(j=>{u(j),i(!1)},[]),E=_.useCallback(j=>{o?c(j):T(j)},[o,T]),{context:z,floatingStyles:L,refs:O}=qh({open:o,setOpen:i,placement:k}),C=Z1(z,{listRef:m,activeIndex:l,selectedIndex:d,onNavigate:c}),P=q1(z,{listRef:p,activeIndex:l,selectedIndex:d,onMatch:E}),{getReferenceProps:F,getFloatingProps:U,getItemProps:Q}=$h({context:z,role:"menu",trigger:w,interactions:[C,P]}),$=_.useMemo(()=>{const[j]=k.split("-");return s_[j]??uf},[k]);return g.jsxs(eg.Provider,{value:{theme:b,activeIndex:l,dismissOnClick:n,getItemProps:Q,handleSelect:T},children:[g.jsxs(a_,{...M,refs:O,inline:S,theme:b,"data-testid":x,className:X(b.floating.target,M.className),setButtonWidth:h,getReferenceProps:F,renderTrigger:s,children:[y,N&&g.jsx($,{className:b.arrowIcon})]}),o&&g.jsx(Lh,{context:z,modal:!1,children:g.jsx("div",{ref:O.setFloating,style:{...L,minWidth:f},"data-testid":"flowbite-dropdown","aria-expanded":o,...U({className:X(b.floating.base,b.floating.animation,"duration-100",!o&&b.floating.hidden,b.floating.style.auto,e)}),children:g.jsx(O1,{elementsRef:m,labelsRef:p,children:g.jsx("ul",{className:b.content,tabIndex:-1,children:t})})})})]})};ng.displayName="Dropdown",tg.displayName="Dropdown.Header",kc.displayName="Dropdown.Divider";const o_=Object.assign(ng,{Item:_c,Header:tg,Divider:kc}),rg=_.forwardRef(({className:t,color:e="gray",helperText:n,sizing:r="md",theme:s={},...a},o)=>{const i=te(fe().fileInput,s);return g.jsxs(g.Fragment,{children:[g.jsx("div",{className:X(i.root.base,t),children:g.jsx("div",{className:i.field.base,children:g.jsx("input",{className:X(i.field.input.base,i.field.input.colors[e],i.field.input.sizes[r]),...a,type:"file",ref:o})})}),n&&g.jsx(Js,{color:e,children:n})]})});rg.displayName="FileInput";const i_=_.forwardRef(({label:t,helperText:e,color:n="default",sizing:r="md",variant:s,disabled:a=!1,theme:o={},className:i,...l},c)=>{const d=_.useId(),u=te(fe().floatingLabel,o);return g.jsxs("div",{children:[g.jsxs("div",{className:X("relative",s==="standard"?"z-0":""),children:[g.jsx("input",{type:"text",id:l.id?l.id:"floatingLabel"+d,"aria-describedby":"outlined_success_help",className:X(u.input[n][s][r],i),placeholder:" ","data-testid":"floating-label",disabled:a,...l,ref:c}),g.jsx("label",{htmlFor:l.id?l.id:"floatingLabel"+d,className:X(u.label[n][s][r],i),children:t})]}),g.jsx("p",{id:"outlined_helper_text"+d,className:X(u.helperText[n],i),children:e})]})});i_.displayName="FloatingLabel";const sg=({alt:t,className:e,children:n,href:r,name:s,src:a,theme:o={},...i})=>{const l=te(fe().footer.brand,o);return g.jsx("div",{children:r?g.jsxs("a",{"data-testid":"flowbite-footer-brand",href:r,className:X(l.base,e),...i,children:[g.jsx("img",{alt:t,src:a,className:l.img}),g.jsx("span",{"data-testid":"flowbite-footer-brand-span",className:l.span,children:s}),n]}):g.jsx("img",{alt:t,"data-testid":"flowbite-footer-brand",src:a,className:X(l.img,e),...i})})},ag=({by:t,className:e,href:n,theme:r={},year:s,...a})=>{const o=te(fe().footer.copyright,r);return g.jsxs("div",{"data-testid":"flowbite-footer-copyright",className:X(o.base,e),...a,children:["© ",s,n?g.jsx("a",{href:n,className:o.href,children:t}):g.jsx("span",{"data-testid":"flowbite-footer-copyright-span",className:o.span,children:t})]})},og=({className:t,theme:e={},...n})=>{const r=te(fe().footer.divider,e);return g.jsx("hr",{"data-testid":"footer-divider",className:X(r.base,t),...n})},ig=({ariaLabel:t,className:e,href:n,icon:r,theme:s={},...a})=>{const o=te(fe().footer.icon,s);return g.jsx("div",{children:n?g.jsx("a",{"aria-label":t,"data-testid":"flowbite-footer-icon",href:n,className:X(o.base,e),...a,children:g.jsx(r,{className:o.size})}):g.jsx(r,{"data-testid":"flowbite-footer-icon",className:o.size,...a})})},lg=({as:t="a",children:e,className:n,href:r,theme:s={},...a})=>{const o=te(fe().footer.groupLink.link,s);return g.jsx("li",{className:X(o.base,n),children:g.jsx(t,{href:r,className:o.href,...a,children:e})})},cg=({children:t,className:e,col:n=!1,theme:r={},...s})=>{const a=te(fe().footer.groupLink,r);return g.jsx("ul",{"data-testid":"footer-groupLink",className:X(a.base,n&&a.col,e),...s,children:t})},dg=({as:t="h2",className:e,theme:n={},title:r,...s})=>{const a=te(fe().footer.title,n);return g.jsx(t,{"data-testid":"flowbite-footer-title",className:X(a.base,e),...s,children:r})},ug=({bgDark:t=!1,children:e,className:n,container:r=!1,theme:s={},...a})=>{const o=te(fe().footer,s);return g.jsx("footer",{"data-testid":"flowbite-footer",className:X(o.root.base,t&&o.root.bgDark,r&&o.root.container,n),...a,children:e})};ug.displayName="Footer",ag.displayName="Footer.Copyright",lg.displayName="Footer.Link",sg.displayName="Footer.Brand",cg.displayName="Footer.LinkGroup",ig.displayName="Footer.Icon",dg.displayName="Footer.Title",og.displayName="Footer.Divider",Object.assign(ug,{Copyright:ag,Link:lg,LinkGroup:cg,Brand:sg,Icon:ig,Title:dg,Divider:og});const Sc=({children:t,className:e,color:n="default",disabled:r=!1,theme:s={},value:a,...o})=>{const i=te(fe().label,s);return g.jsx("label",{className:X(i.root.base,i.root.colors[n],r&&i.root.disabled,e),"data-testid":"flowbite-label",...o,children:a??t??""})};Sc.displayName="Label";const fg=({children:t,className:e,icon:n,theme:r={},...s})=>{const a=te(fe().list.item,r);return g.jsxs("li",{className:X(a.withIcon[n?"on":"off"],e),...s,children:[n&&g.jsx(n,{className:X(a.icon)}),t]})},hg=({children:t,className:e,unstyled:n,nested:r,ordered:s,horizontal:a,theme:o={},...i})=>{const l=te(fe().list,o),c=s?"ol":"ul";return g.jsx(c,{className:X(l.root.base,l.root.ordered[s?"on":"off"],n&&l.root.unstyled,r&&l.root.nested,a&&l.root.horizontal,e),...i,children:t})};hg.displayName="List",fg.displayName="List.Item",Object.assign(hg,{Item:fg});const gg=({active:t,children:e,className:n,href:r,icon:s,onClick:a,theme:o={},disabled:i,...l})=>{const c=te(fe().listGroup.item,o),d=typeof r<"u",u=d?"a":"button";return g.jsx("li",{className:X(c.base,n),children:g.jsxs(u,{href:r,onClick:a,type:d?void 0:"button",disabled:i,className:X(c.link.active[t?"on":"off"],c.link.disabled[i?"on":"off"],c.link.base,c.link.href[d?"on":"off"]),...l,children:[s&&g.jsx(s,{"aria-hidden":!0,"data-testid":"flowbite-list-group-item-icon",className:c.link.icon}),e]})})},mg=({children:t,className:e,theme:n={},...r})=>{const s=te(fe().listGroup,n);return g.jsx("ul",{className:X(s.root.base,e),...r,children:t})};mg.displayName="ListGroup",gg.displayName="ListGroup.Item",Object.assign(mg,{Item:gg});const pg=_.createContext(void 0);function Oc(){const t=_.useContext(pg);if(!t)throw new Error("useModalContext should be used within the ModalContext provider!");return t}const bg=({children:t,className:e,theme:n={},...r})=>{const{theme:s,popup:a}=Oc(),o=te(s.body,n);return g.jsx("div",{className:X(o.base,a&&[o.popup],e),...r,children:t})},yg=({children:t,className:e,theme:n={},...r})=>{const{theme:s,popup:a}=Oc(),o=te(s.footer,n);return g.jsx("div",{className:X(o.base,!a&&o.popup,e),...r,children:t})},wg=({as:t="h3",children:e,className:n,theme:r={},id:s,...a})=>{const o=_.useId(),i=s||o,{theme:l,popup:c,onClose:d,setHeaderId:u}=Oc(),f=te(l.header,r);return _.useLayoutEffect(()=>(u(i),()=>u(void 0)),[i,u]),g.jsxs("div",{className:X(f.base,c&&f.popup,n),...a,children:[g.jsx(t,{id:i,className:f.title,children:e}),g.jsx("button",{"aria-label":"Close",className:f.close.base,type:"button",onClick:d,children:g.jsx(wx,{"aria-hidden":!0,className:f.close.icon})})]})},vg=_.forwardRef(({children:t,className:e,dismissible:n=!1,onClose:r,popup:s,position:a="center",root:o,show:i,size:l="2xl",theme:c={},initialFocus:d,...u},f)=>{const[h,m]=_.useState(void 0),p=te(fe().modal,c),{context:b}=Yh({open:i,onOpenChange:()=>r&&r()}),v=xh([b.refs.setFloating,f]),x=Bh(b),k=Hh(b,{outsidePressEvent:"mousedown",enabled:n}),w=Zh(b),{getFloatingProps:y}=Xh([x,k,w]);return i?g.jsx(pg.Provider,{value:{theme:p,popup:s,onClose:r,setHeaderId:m},children:g.jsx(H1,{root:o,children:g.jsx(U1,{lockScroll:!0,"data-testid":"modal-overlay",className:X(p.root.base,p.root.positions[a],i?p.root.show.on:p.root.show.off,e),...u,children:g.jsx(Lh,{context:b,initialFocus:d,children:g.jsx("div",{ref:v,...y(u),"aria-labelledby":h,className:X(p.content.base,p.root.sizes[l]),children:g.jsx("div",{className:p.content.inner,children:t})})})})})}):null});vg.displayName="Modal",wg.displayName="Modal.Header",bg.displayName="Modal.Body",yg.displayName="Modal.Footer",Object.assign(vg,{Header:wg,Body:bg,Footer:yg});const xg=_.createContext(void 0);function Wo(){const t=_.useContext(xg);if(!t)throw new Error("useNavBarContext should be used within the NavbarContext provider!");return t}const kg=({as:t="a",children:e,className:n,theme:r={},...s})=>{const{theme:a}=Wo(),o=te(a.brand,r);return g.jsx(t,{className:X(o.base,n),...s,children:e})},_g=({children:t,className:e,theme:n={},...r})=>{const{theme:s,isOpen:a}=Wo(),o=te(s.collapse,n);return g.jsx("div",{"data-testid":"flowbite-navbar-collapse",className:X(o.base,o.hidden[a?"off":"on"],e),...r,children:g.jsx("ul",{className:o.list,children:t})})},Sg=({active:t,as:e="a",disabled:n,children:r,className:s,theme:a={},onClick:o,...i})=>{const{theme:l,setIsOpen:c}=Wo(),d=te(l.link,a),u=f=>{c(!1),o==null||o(f)};return g.jsx("li",{children:g.jsx(e,{className:X(d.base,t&&d.active.on,!t&&!n&&d.active.off,d.disabled[n?"on":"off"],s),onClick:u,...i,children:r})})},Og=({barIcon:t=ax,className:e,theme:n={},...r})=>{const{theme:s,isOpen:a,setIsOpen:o}=Wo(),i=te(s.toggle,n),l=()=>{o(!a)};return g.jsxs("button",{"data-testid":"flowbite-navbar-toggle",onClick:l,className:X(i.base,e),...r,children:[g.jsx("span",{className:"sr-only",children:"Open main menu"}),g.jsx(t,{"aria-hidden":!0,className:i.icon})]})},Cg=({border:t,children:e,className:n,fluid:r=!1,menuOpen:s,rounded:a,theme:o={},...i})=>{const[l,c]=_.useState(s),d=te(fe().navbar,o);return g.jsx(xg.Provider,{value:{theme:d,isOpen:l,setIsOpen:c},children:g.jsx("nav",{className:X(d.root.base,d.root.bordered[t?"on":"off"],d.root.rounded[a?"on":"off"],n),...i,children:g.jsx("div",{className:X(d.root.inner.base,d.root.inner.fluid[r?"on":"off"]),children:e})})})};Cg.displayName="Navbar",kg.displayName="Navbar.Brand",_g.displayName="Navbar.Collapse",Sg.displayName="Navbar.Link",Og.displayName="Navbar.Toggle",Object.assign(Cg,{Brand:kg,Collapse:_g,Link:Sg,Toggle:Og});const l_=(t,e)=>t>=e?[]:[...Array(e-t+1).keys()].map(n=>n+t),Cc=({active:t,children:e,className:n,onClick:r,theme:s={},...a})=>{const o=te(fe().pagination,s);return g.jsx("button",{type:"button",className:X(t&&o.pages.selector.active,n),onClick:r,...a,children:e})};Cc.displayName="Pagination.Button";const Dc=({children:t,className:e,onClick:n,theme:r={},disabled:s=!1,...a})=>{const o=te(fe().pagination,r);return g.jsx("button",{type:"button",className:X(s&&o.pages.selector.disabled,e),disabled:s,onClick:n,...a,children:t})};Dc.displayName="Pagination.Navigation";const Dg=({className:t,currentPage:e,layout:n="pagination",nextLabel:r="Next",onPageChange:s,previousLabel:a="Previous",renderPaginationButton:o=u=>g.jsx(Cc,{...u}),showIcons:i=!1,theme:l={},totalPages:c,...d})=>{const u=te(fe().pagination,l),f=Math.min(Math.max(n==="pagination"?e+2:e+4,5),c),h=Math.max(1,f-4),m=()=>{s(Math.min(e+1,c))},p=()=>{s(Math.max(e-1,1))};return g.jsxs("nav",{className:X(u.base,t),...d,children:[n==="table"&&g.jsxs("div",{className:u.layout.table.base,children:["Showing ",g.jsx("span",{className:u.layout.table.span,children:h})," to ",g.jsx("span",{className:u.layout.table.span,children:f})," of ",g.jsx("span",{className:u.layout.table.span,children:c})," Entries"]}),g.jsxs("ul",{className:u.pages.base,children:[g.jsx("li",{children:g.jsxs(Dc,{className:X(u.pages.previous.base,i&&u.pages.showIcon),onClick:p,disabled:e===1,children:[i&&g.jsx(fx,{"aria-hidden":!0,className:u.pages.previous.icon}),a]})}),n==="pagination"&&l_(h,f).map(b=>g.jsx("li",{"aria-current":b===e?"page":void 0,children:o({className:X(u.pages.selector.base,e===b&&u.pages.selector.active),active:b===e,onClick:()=>s(b),children:b})},b)),g.jsx("li",{children:g.jsxs(Dc,{className:X(u.pages.next.base,i&&u.pages.showIcon),onClick:m,disabled:e===c,children:[r,i&&g.jsx(hx,{"aria-hidden":!0,className:u.pages.next.icon})]})})]})]})};Dg.displayName="Pagination",Object.assign(Dg,{Button:Cc});const Mg=_.forwardRef(({className:t,theme:e={},...n},r)=>{const s=te(fe().radio,e);return g.jsx("input",{ref:r,type:"radio",className:X(s.root.base,t),...n})});Mg.displayName="Radio";const c_=_.forwardRef(({className:t,sizing:e="md",theme:n={},...r},s)=>{const a=te(fe().rangeSlider,n);return g.jsx(g.Fragment,{children:g.jsx("div",{"data-testid":"flowbite-range-slider",className:X(a.root.base,t),children:g.jsx("div",{className:a.field.base,children:g.jsx("input",{ref:s,type:"range",className:X(a.field.input.base,a.field.input.sizes[e]),...r})})})})});c_.displayName="RangeSlider";const Eg=({children:t,className:e,percentFilled:n=0,theme:r={},...s})=>{const a=te(fe().ratingAdvanced,r);return g.jsxs("div",{className:X(a.base,e),...s,children:[g.jsx("span",{className:a.label,children:t}),g.jsx("div",{className:a.progress.base,children:g.jsx("div",{className:a.progress.fill,"data-testid":"flowbite-rating-fill",style:{width:`${n}%`}})}),g.jsx("span",{className:a.progress.label,children:`${n}%`})]})},Pg=_.createContext(void 0);function d_(){const t=_.useContext(Pg);if(!t)throw new Error("useRatingContext should be used within the RatingContext provider!");return t}const Tg=({className:t,filled:e=!0,starIcon:n=mx,theme:r={},...s})=>{const{theme:a,size:o="sm"}=d_(),i=te(a.star,r);return g.jsx(n,{"data-testid":"flowbite-rating-star",className:X(i.sizes[o],i[e?"filled":"empty"],t),...s})},Ng=({children:t,className:e,size:n="sm",theme:r={},...s})=>{const a=te(fe().rating,r);return g.jsx(Pg.Provider,{value:{theme:a,size:n},children:g.jsx("div",{className:X(a.root.base,e),...s,children:t})})};Ng.displayName="Rating",Tg.displayName="Rating.Star",Eg.displayName="Rating.Advanced",Object.assign(Ng,{Star:Tg,Advanced:Eg});const u_=_.forwardRef(({addon:t,children:e,className:n,color:r="gray",helperText:s,icon:a,shadow:o,sizing:i="md",theme:l={},...c},d)=>{const u=te(fe().select,l);return g.jsxs("div",{className:X(u.base,n),children:[t&&g.jsx("span",{className:u.addon,children:t}),g.jsxs("div",{className:u.field.base,children:[a&&g.jsx("div",{className:u.field.icon.base,children:g.jsx(a,{className:u.field.icon.svg})}),g.jsx("select",{className:X(u.field.select.base,u.field.select.colors[r],u.field.select.sizes[i],u.field.select.withIcon[a?"on":"off"],u.field.select.withAddon[t?"on":"off"],u.field.select.withShadow[o?"on":"off"]),...c,ref:d,children:e}),s&&g.jsx(Js,{color:r,children:s})]})]})});u_.displayName="Select";const f_=({animation:t="duration-300",arrow:e=!0,children:n,className:r,content:s,placement:a="top",style:o="dark",theme:i,trigger:l="hover",minWidth:c,...d})=>{const u=_.useRef(null),[f,h]=_.useState(!1),m=qh({open:f,placement:a,arrowRef:u,setOpen:h}),{context:p,middlewareData:{arrow:{x:b,y:v}={}},refs:x,strategy:k,update:w,x:y,y:S}=m,N=G1(p),{getFloatingProps:M,getReferenceProps:T}=$h({context:p,role:"tooltip",trigger:l,interactions:[N]});return _.useEffect(()=>{if(x.reference.current&&x.floating.current&&f)return fh(x.reference.current,x.floating.current,w)},[f,x.floating,x.reference,w]),g.jsxs(g.Fragment,{children:[g.jsx("div",{ref:x.setReference,className:i.target,"data-testid":"flowbite-tooltip-target",...T(),children:n}),g.jsxs("div",{ref:x.setFloating,"data-testid":"flowbite-tooltip",...M({className:X(i.base,t&&`${i.animation} ${t}`,!f&&i.hidden,i.style[o],r),style:{position:k,top:S??" ",left:y??" ",minWidth:c},...d}),children:[g.jsx("div",{className:i.content,children:s}),e&&g.jsx("div",{className:X(i.arrow.base,o==="dark"&&i.arrow.style.dark,o==="light"&&i.arrow.style.light,o==="auto"&&i.arrow.style.auto),"data-testid":"flowbite-tooltip-arrow",ref:u,style:{top:v??" ",left:b??" ",right:" ",bottom:" ",[r_({placement:m.placement})]:i.arrow.placement},children:" "})]})]})},Mc=({animation:t="duration-300",arrow:e=!0,children:n,className:r,content:s,placement:a="top",style:o="dark",theme:i={},trigger:l="hover",...c})=>{const d=te(fe().tooltip,i);return g.jsx(f_,{animation:t,arrow:e,content:s,placement:a,style:o,theme:d,trigger:l,className:r,...c,children:n})};Mc.displayName="Tooltip";const jg=_.createContext(void 0);function ps(){const t=_.useContext(jg);if(!t)throw new Error("useSidebarContext should be used within the SidebarContext provider!");return t}const Ec=_.createContext(void 0);function h_(){const t=_.useContext(Ec);if(!t)throw new Error("useSidebarItemContext should be used within the SidebarItemContext provider!");return t}const Ig=({children:t,className:e,icon:n,label:r,chevronIcon:s=Fl,renderChevronIcon:a,open:o=!1,theme:i={},...l})=>{const c=_.useId(),[d,u]=_.useState(o),{theme:f,isCollapsed:h}=ps(),m=te(f.collapse,i);_.useEffect(()=>u(o),[o]);const p=({children:b})=>g.jsx("li",{children:h&&!d?g.jsx(Mc,{content:r,placement:"right",children:b}):b});return g.jsxs(p,{children:[g.jsxs("button",{id:`flowbite-sidebar-collapse-${c}`,onClick:()=>u(!d),title:r,type:"button",className:X(m.button,e),...l,children:[n&&g.jsx(n,{"aria-hidden":!0,"data-testid":"flowbite-sidebar-collapse-icon",className:X(m.icon.base,m.icon.open[d?"on":"off"])}),h?g.jsx("span",{className:"sr-only",children:r}):g.jsxs(g.Fragment,{children:[g.jsx("span",{"data-testid":"flowbite-sidebar-collapse-label",className:m.label.base,children:r}),a?a(m,d):g.jsx(s,{"aria-hidden":!0,className:X(m.label.icon.base,m.label.icon.open[d?"on":"off"])})]})]}),g.jsx("ul",{"aria-labelledby":`flowbite-sidebar-collapse-${c}`,hidden:!d,className:m.list,children:g.jsx(Ec.Provider,{value:{isInsideCollapse:!0},children:t})})]})};Ig.displayName="Sidebar.Collapse";const Ag=({children:t,color:e="info",className:n,theme:r={},...s})=>{const{theme:a,isCollapsed:o}=ps(),i=te(a.cta,r);return g.jsx("div",{"data-testid":"sidebar-cta",hidden:o,className:X(i.base,i.color[e],n),...s,children:t})};Ag.displayName="Sidebar.CTA";const g_=({id:t,theme:e,isCollapsed:n,tooltipChildren:r,children:s,...a})=>g.jsx("li",{...a,children:n?g.jsx(Mc,{content:g.jsx(Rg,{id:t,theme:e,children:r}),placement:"right",children:s}):s}),Rg=({id:t,theme:e,children:n})=>g.jsx("span",{"data-testid":"flowbite-sidebar-item-content",id:`flowbite-sidebar-item-${t}`,className:X(e.content.base),children:n}),Lg=_.forwardRef(({active:t,as:e="a",children:n,className:r,icon:s,label:a,labelColor:o="info",theme:i={},...l},c)=>{var p,b,v,x;const d=_.useId(),{theme:u,isCollapsed:f}=ps(),{isInsideCollapse:h}=h_(),m=te(u.item,i);return g.jsx(g_,{theme:m,className:m.listItem,id:d,isCollapsed:f,tooltipChildren:n,children:g.jsxs(e,{"aria-labelledby":`flowbite-sidebar-item-${d}`,ref:c,className:X(m.base,t&&m.active,!f&&h&&((p=m.collapsed)==null?void 0:p.insideCollapse),r),...l,children:[s&&g.jsx(s,{"aria-hidden":!0,"data-testid":"flowbite-sidebar-item-icon",className:X((b=m.icon)==null?void 0:b.base,t&&((v=m.icon)==null?void 0:v.active))}),f&&!s&&g.jsx("span",{className:(x=m.collapsed)==null?void 0:x.noIcon,children:n.charAt(0).toLocaleUpperCase()??"?"}),!f&&g.jsx(Rg,{id:d,theme:m,children:n}),!f&&a&&g.jsx(Ef,{color:o,"data-testid":"flowbite-sidebar-label",hidden:f,className:m.label,children:a})]})})});Lg.displayName="Sidebar.Item";const Fg=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=ps(),a=te(s.itemGroup,n);return g.jsx("ul",{"data-testid":"flowbite-sidebar-item-group",className:X(a.base,e),...r,children:g.jsx(Ec.Provider,{value:{isInsideCollapse:!1},children:t})})};Fg.displayName="Sidebar.ItemGroup";const Wg=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=ps(),a=te(s.items,n);return g.jsx("div",{className:X(a.base,e),"data-testid":"flowbite-sidebar-items",...r,children:t})};Wg.displayName="Sidebar.Items";const Bg=({children:t,className:e,href:n,img:r,imgAlt:s="",theme:a={},...o})=>{const i=_.useId(),{theme:l,isCollapsed:c}=ps(),d=te(l.logo,a);return g.jsxs("a",{"aria-labelledby":`flowbite-sidebar-logo-${i}`,href:n,className:X(d.base,e),...o,children:[g.jsx("img",{alt:s,src:r,className:d.img}),g.jsx("span",{className:d.collapsed[c?"on":"off"],id:`flowbite-sidebar-logo-${i}`,children:t})]})};Bg.displayName="Sidebar.Logo";const zg=({children:t,as:e="nav",collapseBehavior:n="collapse",collapsed:r=!1,theme:s={},className:a,...o})=>{const i=te(fe().sidebar,s);return g.jsx(jg.Provider,{value:{theme:i,isCollapsed:r},children:g.jsx(e,{"aria-label":"Sidebar",hidden:r&&n==="hide",className:X(i.root.base,i.root.collapsed[r?"on":"off"],a),...o,children:g.jsx("div",{className:i.root.inner,children:t})})})};zg.displayName="Sidebar",Object.assign(zg,{Collapse:Ig,CTA:Ag,Item:Lg,Items:Wg,ItemGroup:Fg,Logo:Bg});const Hg=_.createContext(void 0);function m_(){const t=_.useContext(Hg);if(!t)throw new Error("useTableBodyContext should be used within the TableBodyContext provider!");return t}const Yg=_.createContext(void 0);function Pc(){const t=_.useContext(Yg);if(!t)throw new Error("useTableContext should be used within the TableContext provider!");return t}const Vg=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:a}=Pc(),o=te(a.body,n);return g.jsx(Hg.Provider,{value:{theme:o},children:g.jsx("tbody",{className:X(o.base,e),ref:s,...r,children:t})})});Vg.displayName="Table.Body";const Ug=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:a}=m_(),o=te(a.cell,n);return g.jsx("td",{className:X(o.base,e),ref:s,...r,children:t})});Ug.displayName="Table.Cell";const Xg=_.createContext(void 0);function p_(){const t=_.useContext(Xg);if(!t)throw new Error("useTableHeadContext should be used within the TableHeadContext provider!");return t}const Kg=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:a}=Pc(),o=te(a.head,n);return g.jsx(Xg.Provider,{value:{theme:o},children:g.jsx("thead",{className:X(o.base,e),ref:s,...r,children:g.jsx("tr",{children:t})})})});Kg.displayName="Table.Head";const Gg=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:a}=p_(),o=te(a.cell,n);return g.jsx("th",{className:X(o.base,e),ref:s,...r,children:t})});Gg.displayName="Table.HeadCell";const Qg=_.forwardRef(({children:t,className:e,theme:n={},...r},s)=>{const{theme:a,hoverable:o,striped:i}=Pc(),l=te(a.row,n);return g.jsx("tr",{ref:s,"data-testid":"table-row-element",className:X(l.base,i&&l.striped,o&&l.hovered,e),...r,children:t})});Qg.displayName="Table.Row";const Zg=_.forwardRef(({children:t,className:e,striped:n,hoverable:r,theme:s={},...a},o)=>{const i=te(fe().table,s);return g.jsx("div",{"data-testid":"table-element",className:X(i.root.wrapper),children:g.jsxs(Yg.Provider,{value:{theme:i,striped:n,hoverable:r},children:[g.jsx("div",{className:X(i.root.shadow,e)}),g.jsx("table",{className:X(i.root.base,e),...a,ref:o,children:t})]})})});Zg.displayName="Table";const sr=Object.assign(Zg,{Head:Kg,Body:Vg,Row:Qg,Cell:Ug,HeadCell:Gg}),Jg=({children:t,className:e})=>g.jsx("div",{className:e,children:t});Jg.displayName="Tabs.Item";const qg=_.forwardRef(({children:t,className:e,onActiveTabChange:n,style:r="default",theme:s={},...a},o)=>{const i=te(fe().tabs,s),l=_.useId(),c=_.useMemo(()=>_.Children.map(_.Children.toArray(t),({props:w})=>w),[t]),d=_.useRef([]),[u,f]=_.useState(Math.max(0,c.findIndex(w=>w.active))),[h,m]=_.useState(-1),p=w=>{f(w),n&&n(w)},b=({target:w})=>{p(w),m(w)},v=({event:w,target:y})=>{w.key==="ArrowLeft"&&m(Math.max(0,h-1)),w.key==="ArrowRight"&&m(Math.min(c.length-1,h+1)),w.key==="Enter"&&(p(y),m(y))},x=i.tablist.tabitem.styles[r],k=i.tabitemcontainer.styles[r];return _.useEffect(()=>{var w;(w=d.current[h])==null||w.focus()},[h]),_.useImperativeHandle(o,()=>({setActiveTab:p})),g.jsxs("div",{className:X(i.base,e),children:[g.jsx("div",{"aria-label":"Tabs",role:"tablist",className:X(i.tablist.base,i.tablist.styles[r],e),...a,children:c.map((w,y)=>g.jsxs("button",{type:"button","aria-controls":`${l}-tabpanel-${y}`,"aria-selected":y===u,className:X(i.tablist.tabitem.base,x.base,y===u&&x.active.on,y!==u&&!w.disabled&&x.active.off),disabled:w.disabled,id:`${l}-tab-${y}`,onClick:()=>b({target:y}),onKeyDown:S=>v({event:S,target:y}),ref:S=>d.current[y]=S,role:"tab",tabIndex:y===h?0:-1,style:{zIndex:y===h?2:1},children:[w.icon&&g.jsx(w.icon,{className:i.tablist.tabitem.icon}),w.title]},y))}),g.jsx("div",{className:X(i.tabitemcontainer.base,k),children:c.map((w,y)=>g.jsx("div",{"aria-labelledby":`${l}-tab-${y}`,className:i.tabpanel,hidden:y!==u,id:`${l}-tabpanel-${y}`,role:"tabpanel",tabIndex:0,children:w.children},y))})]})});qg.displayName="Tabs",Object.assign(qg,{Item:Jg});const b_=_.forwardRef(({className:t,color:e="gray",helperText:n,shadow:r,theme:s={},...a},o)=>{const i=te(fe().textarea,s);return g.jsxs(g.Fragment,{children:[g.jsx("textarea",{ref:o,className:X(i.base,i.colors[e],i.withShadow[r?"on":"off"],t),...a}),n&&g.jsx(Js,{color:e,children:n})]})});b_.displayName="Textarea";const $g=_.createContext(void 0);function Tc(){const t=_.useContext($g);if(!t)throw new Error("useTimelineContentContext should be used within the TimelineContentContext provider!");return t}const em=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=Tc(),a=te(s.body,n);return g.jsx("div",{className:X(a.base,e),...r,children:t})},tm=_.createContext(void 0);function Nc(){const t=_.useContext(tm);if(!t)throw new Error("useTimelineContext should be used within the TimelineContext provider!");return t}const nm=_.createContext(void 0);function rm(){const t=_.useContext(nm);if(!t)throw new Error("useTimelineItemContext should be used within the TimelineItemContext provider!");return t}const sm=({children:t,className:e,theme:n={},...r})=>{const{horizontal:s}=Nc(),{theme:a}=rm(),o=te(a.content,n);return g.jsx($g.Provider,{value:{theme:o},children:g.jsx("div",{"data-testid":"timeline-content",className:X(s&&o.root.base,e),...r,children:t})})},am=({children:t,className:e,theme:n={},...r})=>{const{theme:s,horizontal:a}=Nc(),o=te(s.item,n);return g.jsx(nm.Provider,{value:{theme:o},children:g.jsx("li",{"data-testid":"timeline-item",className:X(a&&o.root.horizontal,!a&&o.root.vertical,e),...r,children:t})})},om=({children:t,className:e,icon:n,theme:r={},...s})=>{const{horizontal:a}=Nc(),{theme:o}=rm(),i=te(o.point,r);return g.jsxs("div",{"data-testid":"timeline-point",className:X(a&&i.horizontal,!a&&i.vertical,e),...s,children:[t,n?g.jsx("span",{className:X(i.marker.icon.wrapper),children:g.jsx(n,{"aria-hidden":!0,className:X(i.marker.icon.base)})}):g.jsx("div",{className:X(a&&i.marker.base.horizontal,!a&&i.marker.base.vertical)}),a&&g.jsx("div",{className:X(i.line)})]})},im=({children:t,className:e,theme:n={},...r})=>{const{theme:s}=Tc(),a=te(s.time,n);return g.jsx("time",{className:X(a.base,e),...r,children:t})},lm=({as:t="h3",children:e,className:n,theme:r={},...s})=>{const{theme:a}=Tc(),o=te(a.title,r);return g.jsx(t,{className:X(o.base,n),...s,children:e})},cm=({children:t,className:e,horizontal:n,theme:r={},...s})=>{const a=te(fe().timeline,r);return g.jsx(tm.Provider,{value:{theme:a,horizontal:n},children:g.jsx("ol",{"data-testid":"timeline-component",className:X(n&&a.root.direction.horizontal,!n&&a.root.direction.vertical,e),...s,children:t})})};cm.displayName="Timeline",am.displayName="Timeline.Item",om.displayName="Timeline.Point",sm.displayName="Timeline.Content",im.displayName="Timeline.Time",lm.displayName="Timeline.Title",em.displayName="Timeline.Body",Object.assign(cm,{Item:am,Point:om,Content:sm,Time:im,Title:lm,Body:em});const dm=_.createContext(void 0);function y_(){const t=_.useContext(dm);if(!t)throw new Error("useToastContext should be used within the ToastContext provider!");return t}const um=({className:t,onClick:e,theme:n={},xIcon:r=px,onDismiss:s,...a})=>{const{theme:o,duration:i,isClosed:l,isRemoved:c,setIsClosed:d,setIsRemoved:u}=y_(),f=te(o.toggle,n),h=m=>{if(e&&e(m),s){s();return}d(!l),setTimeout(()=>u(!c),i)};return g.jsx("button",{"aria-label":"Close",onClick:h,type:"button",className:X(f.base,t),...a,children:g.jsx(r,{"aria-hidden":!0,className:f.icon})})},w_={75:"duration-75",100:"duration-100",150:"duration-150",200:"duration-200",300:"duration-300",500:"duration-500",700:"duration-700",1e3:"duration-1000"},fm=({children:t,className:e,duration:n=300,theme:r={},...s})=>{const[a,o]=_.useState(!1),[i,l]=_.useState(!1),c=te(fe().toast,r);return i?null:g.jsx(dm.Provider,{value:{theme:c,duration:n,isClosed:a,isRemoved:i,setIsClosed:o,setIsRemoved:l},children:g.jsx("div",{"data-testid":"flowbite-toast",role:"alert",className:X(c.root.base,w_[n],a&&c.root.closed,e),...s,children:t})})};fm.displayName="Toast",um.displayName="Toast.Toggle",Object.assign(fm,{Toggle:um});const v_=_.forwardRef(({checked:t,className:e,color:n="blue",sizing:r="md",disabled:s,label:a,name:o,onChange:i,theme:l={},...c},d)=>{const u=_.useId(),f=te(fe().toggleSwitch,l),h=()=>i(!t),m=()=>{h()},p=b=>{b.code=="Enter"&&b.preventDefault()};return g.jsxs(g.Fragment,{children:[o&&t?g.jsx("input",{ref:d,checked:t,hidden:!0,name:o,readOnly:!0,type:"checkbox",className:"sr-only"}):null,g.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:X(f.root.base,f.root.active[s?"off":"on"],e),...c,children:[g.jsx("div",{"data-testid":"flowbite-toggleswitch-toggle",className:X(f.toggle.base,f.toggle.checked[t?"on":"off"],t&&f.toggle.checked.color[n],f.toggle.sizes[r])}),a!=null&&a.length?g.jsx("span",{"data-testid":"flowbite-toggleswitch-label",id:`${u}-flowbite-toggleswitch-label`,className:f.root.label,children:a}):null]})]})});v_.displayName="ToggleSwitch";const jc=_.forwardRef(({icon:t,placeholder:e,label:n,error:r,type:s,classInclude:a,maxLength:o,onChange:i,...l},c)=>g.jsxs("div",{className:`${n?"mb-3":""}`,children:[n&&g.jsx("label",{className:"mb-1 block font-semibold",children:n}),t===!0?g.jsx(qs,{className:`${a}`,maxLength:o,ref:c,type:s,rightIcon:lx,placeholder:e,onChange:i,...l}):g.jsx(qs,{className:`${a}`,maxLength:o,ref:c,type:s,placeholder:e,onChange:i,...l}),r&&g.jsx("p",{className:"mt-1 text-sm text-red-500",children:r})]}));jc.displayName="InputForm";const x_={"mth-password":"passwordInput-module__mth-password__R6DoN"},Ic=({placeholder:t,onChange:e,value:n,...r})=>{const[s,a]=_.useState(!1),o=()=>{a(!s)};return g.jsx("div",{className:"mb-5",children:g.jsxs("div",{className:"relative inline-block w-full",children:[g.jsx("input",{type:s?"text":"password",value:n,className:"w-full border p-2 pr-10",onChange:e,placeholder:t,...r}),g.jsx("button",{type:"button",onClick:o,className:x_["mth-password"],children:s?g.jsx(ox,{}):g.jsx(ix,{})})]})})},hm={mth_progress_bar:"progressBar-module__mth_progress_bar__q2V2y",mth_progress_bar_thumb:"progressBar-module__mth_progress_bar_thumb__OTDNJ"},gm=({start:t,end:e,current:n,type:r})=>{const s=(n-t)/(e-t)*100,a=Math.min(Math.max(s,0),100),o=()=>a<10?"left-0":a>90?"right-0":"left-1/2 transform -translate-x-1/2";return g.jsxs("div",{className:"w-full p-1",children:[g.jsxs("div",{className:"mb-2 flex justify-between text-xs text-gray-400",children:[g.jsx("span",{children:t.toLocaleString()}),g.jsx("span",{children:e.toLocaleString()})]}),g.jsxs("div",{className:"relative mb-5 h-1 w-full rounded-full bg-gray-200",children:[g.jsx("div",{className:`${hm.mth_progress_bar} absolute left-0 top-0 h-full rounded-full transition-all duration-300`,style:{width:`${a}%`}}),g.jsxs("div",{className:"absolute top-1/2 transform -translate-y-1/2 -translate-x-1/2",style:{left:`${a}%`},children:[g.jsx("div",{className:`${hm.mth_progress_bar_thumb} w-2 h-2 rounded-full shadow-lg`}),g.jsxs("div",{className:`absolute top-full mt-2 text-xs font-medium text-black whitespace-nowrap ${o()}`,children:[n.toLocaleString()," ",r==="percentage"?"%":""]})]})]})]})},mm=_.forwardRef(({options:t,label:e,error:n,value:r,onChange:s,id:a,classDiv:o,...i},l)=>g.jsxs("div",{className:o,children:[g.jsxs("select",{ref:l,id:a,className:"h-8 w-full rounded-lg border px-3 py-0.5",value:r,onChange:s,...i,children:[g.jsx("option",{value:"0",children:e||"Seleccione una opción"}),t==null?void 0:t.map(c=>g.jsx("option",{value:c.value,children:c.label},c.value))]}),n&&g.jsx("p",{className:"mt-1 text-sm text-red-500",children:n})]}));mm.displayName="SelectForm";const pm={mth_card_indicator:"card-module__mth_card_indicator__lfgp3"},k_=({logo:t,number:e,title:n,start:r,end:s,current:a,type:o,classIm:i})=>{const l=c=>new Intl.NumberFormat("es-ES",{maximumFractionDigits:2,minimumFractionDigits:0}).format(c);return g.jsxs("div",{className:`${pm.mth_card_indicator} flex flex-col border bg-white px-3.5 py-4`,children:[g.jsx("div",{className:"flex justify-end",children:g.jsx(xr,{src:t||"",alt:"Icon",width:30,height:30,classIm:i})}),g.jsx("h2",{className:"mt-2 font-bold mth_card_indicator_title",id:`mth_card_indicator_${n}_title`,children:n.toUpperCase()}),g.jsxs("small",{className:"text-2xl font-extrabold mth_card_indicator_number",children:[l(e)," ",o==="percentage"?"%":""]}),g.jsx("div",{className:"mt-2 mth_card_indicator_progress_bar",children:g.jsx(gm,{start:r,end:s,current:a,type:o})})]})};/*!
9
9
  * @kurkle/color v0.3.4
10
10
  * https://github.com/kurkle/color#readme
11
11
  * (c) 2024 Jukka Kurkela
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui-mathilde-web",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"