@daxence/flexy-date-picker 1.0.0

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.
@@ -0,0 +1,5 @@
1
+ (function(K,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react/jsx-runtime"),require("react"),require("dayjs"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","dayjs","react-dom"],y):(K=typeof globalThis<"u"?globalThis:K||self,y(K.FlexyDatePicker={},K.jsxRuntime,K.React,K.dayjs,K.ReactDOM))})(this,function(K,y,$,Q,lr){"use strict";function Jt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const h=Jt($),Qt=Jt(lr);var en=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nn={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(en,function(){return function(n,r,o){r.prototype.isToday=function(){var i="YYYY-MM-DD",s=o();return this.format(i)===s.format(i)}}})})(nn);var cr=nn.exports;const ar=tn(cr);var rn={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(en,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,o,i){var s=o.prototype,l=s.format;i.en.formats=n,s.format=function(a){a===void 0&&(a="YYYY-MM-DDTHH:mm:ssZ");var c=this.$locale().formats,f=function(d,p){return d.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(u,v,m){var b=m&&m.toUpperCase();return v||p[m]||n[m]||p[b].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(g,E,S){return E||S.slice(1)})})}(a,c===void 0?{}:c);return l.call(this,f)}}})})(rn);var ur=rn.exports;const fr=tn(ur),vt=$.createContext(null);function ze(){const e=$.useContext(vt);if(!e)throw new Error("useDatePickerContext must be used inside <DatePicker>");return e}function U(...e){return e.filter(Boolean).join(" ")}function ce(e,t){return!e||!t?!1:e.isSame(t,"day")}function qe(e,t,n){if(!t||!n)return!1;const r=t.isBefore(n)?t:n,o=t.isBefore(n)?n:t;return e.isAfter(r,"day")&&e.isBefore(o,"day")}function ht(e,t){if(!t.start)return!1;const n=t.end&&t.start.isAfter(t.end)?t.end:t.start;return ce(e,n)}function gt(e,t){if(!t.end)return!1;const n=t.start&&t.start.isAfter(t.end)?t.start:t.end;return ce(e,n)}function dr(e,t){return!t.start||!t.end?!1:ht(e,t)||gt(e,t)||qe(e,t.start,t.end)}function on(e,t){var n,r;return t===!0?!0:t?!!(t.before&&e.isBefore(t.before,"day")||t.after&&e.isAfter(t.after,"day")||(n=t.dates)!=null&&n.some(o=>ce(e,o))||(r=t.predicate)!=null&&r.call(t,e)):!1}function sn(e,t,n=0){const r=Q(new Date(e,t,1)),o=r.endOf("month");let i=r.day()-n;i<0&&(i+=7);const s=i+o.date(),l=s%7===0?0:7-s%7,a=[];for(let c=i;c>0;c--)a.push(r.subtract(c,"day"));for(let c=1;c<=o.date();c++)a.push(Q(new Date(e,t,c)));for(let c=1;c<=l;c++)a.push(o.add(c,"day"));return a}function ln(e=0,t){const n=Q().locale(t??"en"),r=[];for(let o=0;o<7;o++){const i=(e+o)%7;r.push(n.day(i).format("dd"))}return r}function cn(e){const t=Q().locale(e??"en");return Array.from({length:12},(n,r)=>t.month(r).format("MMMM"))}function pr(e=50){const t=Q().year(),n=[];for(let r=t-e;r<=t+e;r++)n.push(r);return n}function an(e){const[t,n]=e.split(":"),r=Number(t),o=Number(n);return!Number.isInteger(r)||!Number.isInteger(o)||r<0||r>23||o<0||o>59?null:r*60+o}function Ge(e=15,t="00:00",n="23:59"){const r=an(t)??0,o=an(n)??24*60-1,i=Math.max(1,e),s=Math.min(r,o),l=Math.max(r,o),a=[];for(let c=s;c<=l;c+=i){const f=String(Math.floor(c/60)).padStart(2,"0"),d=String(c%60).padStart(2,"0");a.push(`${f}:${d}`)}return a}function un(e){var r;if(e.unavailable)return[];if(!((r=e.ranges)!=null&&r.length))return[];const t=new Set,n=[];for(const o of e.ranges){const i=Ge(o.step,o.from,o.to);for(const s of i)t.has(s)||(t.add(s),n.push(s))}return n}function yt(e,t,n){var l,a,c;if(!n)return!1;const r=e.day(),o=(l=n.weekdays)==null?void 0:l[r];if(o!=null&&o.includes(t))return!0;const i=e.format("YYYY-MM-DD"),s=(a=n.dates)==null?void 0:a[i];return!!(s!=null&&s.includes(t)||(c=n.predicate)!=null&&c.call(n,e,t))}const mr="‹",vr="›";function fn({panelIndex:e=0,totalPanels:t=1}){const n=$.useRef(null),[r,o]=$.useState(null),{currentYear:i,currentMonth:s,setCurrentYear:l,setCurrentMonth:a,locale:c,showMonthYearSelectors:f=!0,classNames:d,styles:p,renderNavButton:u,onMonthChange:v,onYearChange:m}=ze(),b=(s+e)%12,g=i+Math.floor((s+e)/12),E=cn(c),S=pr(50),L=e===0,R=e===t-1;$.useEffect(()=>{function T(x){n.current&&!n.current.contains(x.target)&&o(null)}return r&&document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[r]);function P(T){const x=i*12+s+T,O=Math.floor(x/12),F=(x%12+12)%12;a(F),l(O),v==null||v(F,O)}function N(T,x){const O=x*12+T-e,F=Math.floor(O/12),D=(O%12+12)%12;a(D),l(F),v==null||v(T,x)}function M(T,x){(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),x())}function I(){P(-1)}function C(){P(1)}function V(T){N(T,g),o(null)}function _(T){N(b,T),m==null||m(T),o(null)}return y.jsxs("div",{ref:n,className:U("fldp-calendar-header",d.calendarHeader),style:p.calendarHeader,children:[L?u?u("prev",I):y.jsx("span",{onClick:I,onKeyDown:T=>M(T,I),"aria-label":"Previous month",role:"button",tabIndex:0,className:U("fldp-nav-button",d.navButton),style:p.navButton,children:mr}):y.jsx("span",{style:{width:28}}),y.jsx("div",{className:"fldp-month-year-selectors",style:p.monthYearLabel,children:f?y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"fldp-header-field-group",children:[y.jsxs("span",{className:U("fldp-header-trigger",r==="month"&&"fldp-header-trigger--open"),role:"button",tabIndex:0,"aria-haspopup":"listbox","aria-expanded":r==="month",onClick:()=>o(r==="month"?null:"month"),onKeyDown:T=>M(T,()=>o(r==="month"?null:"month")),children:[y.jsx("span",{className:"fldp-header-trigger-label",children:E[b]}),y.jsx("span",{className:"fldp-header-trigger-caret","aria-hidden":"true",children:"▾"})]}),r==="month"&&y.jsx("div",{className:"fldp-header-menu",role:"listbox","aria-label":"Select month",children:E.map((T,x)=>y.jsx("span",{className:U("fldp-header-option",x===b&&"fldp-header-option--active"),role:"option","aria-selected":x===b,tabIndex:0,onClick:()=>V(x),onKeyDown:O=>M(O,()=>V(x)),children:T},T))})]}),y.jsxs("div",{className:"fldp-header-field-group",children:[y.jsxs("span",{className:U("fldp-header-trigger",r==="year"&&"fldp-header-trigger--open"),role:"button",tabIndex:0,"aria-haspopup":"listbox","aria-expanded":r==="year",onClick:()=>o(r==="year"?null:"year"),onKeyDown:T=>M(T,()=>o(r==="year"?null:"year")),children:[y.jsx("span",{className:"fldp-header-trigger-label",children:g}),y.jsx("span",{className:"fldp-header-trigger-caret","aria-hidden":"true",children:"▾"})]}),r==="year"&&y.jsx("div",{className:"fldp-header-menu fldp-header-menu--year",role:"listbox","aria-label":"Select year",children:S.map(T=>y.jsx("span",{className:U("fldp-header-option",T===g&&"fldp-header-option--active"),role:"option","aria-selected":T===g,tabIndex:0,onClick:()=>_(T),onKeyDown:x=>M(x,()=>_(T)),children:T},T))})]})]}):y.jsxs("div",{className:"fldp-month-year-label",children:[E[b].toUpperCase()," ",g]})}),R?u?u("next",C):y.jsx("span",{onClick:C,onKeyDown:T=>M(T,C),"aria-label":"Next month",role:"button",tabIndex:0,className:U("fldp-nav-button",d.navButton),style:p.navButton,children:vr}):y.jsx("span",{style:{width:28}})]})}function Ze(){return typeof window<"u"}function Te(e){return bt(e)?(e.nodeName||"").toLowerCase():"#document"}function ne(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ae(e){var t;return(t=(bt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function bt(e){return Ze()?e instanceof Node||e instanceof ne(e).Node:!1}function z(e){return Ze()?e instanceof Element||e instanceof ne(e).Element:!1}function oe(e){return Ze()?e instanceof HTMLElement||e instanceof ne(e).HTMLElement:!1}function wt(e){return!Ze()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ne(e).ShadowRoot}function Ie(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=re(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function hr(e){return/^(table|td|th)$/.test(Te(e))}function Je(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const gr=/transform|translate|scale|rotate|perspective|filter/,yr=/paint|layout|strict|content/,we=e=>!!e&&e!=="none";let xt;function Et(e){const t=z(e)?re(e):e;return we(t.transform)||we(t.translate)||we(t.scale)||we(t.rotate)||we(t.perspective)||!Qe()&&(we(t.backdropFilter)||we(t.filter))||gr.test(t.willChange||"")||yr.test(t.contain||"")}function br(e){let t=he(e);for(;oe(t)&&!ve(t);){if(Et(t))return t;if(Je(t))return null;t=he(t)}return null}function Qe(){return xt==null&&(xt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),xt}function ve(e){return/^(html|body|#document)$/.test(Te(e))}function re(e){return ne(e).getComputedStyle(e)}function et(e){return z(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function he(e){if(Te(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wt(e)&&e.host||ae(e);return wt(t)?t.host:t}function dn(e){const t=he(e);return ve(t)?e.ownerDocument?e.ownerDocument.body:e.body:oe(t)&&Ie(t)?t:dn(t)}function ge(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=dn(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=ne(o);if(i){const l=St(s);return t.concat(s,s.visualViewport||[],Ie(o)?o:[],l&&n?ge(l):[])}else return t.concat(o,ge(o,[],n))}function St(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const De=Math.min,xe=Math.max,tt=Math.round,nt=Math.floor,ue=e=>({x:e,y:e}),wr={left:"right",right:"left",bottom:"top",top:"bottom"};function Mt(e,t,n){return xe(e,De(t,n))}function Fe(e,t){return typeof e=="function"?e(t):e}function Ee(e){return e.split("-")[0]}function Ye(e){return e.split("-")[1]}function pn(e){return e==="x"?"y":"x"}function Lt(e){return e==="y"?"height":"width"}function ye(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Tt(e){return pn(ye(e))}function xr(e,t,n){n===void 0&&(n=!1);const r=Ye(e),o=Tt(e),i=Lt(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=rt(s)),[s,rt(s)]}function Er(e){const t=rt(e);return[Dt(e),t,Dt(t)]}function Dt(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const mn=["left","right"],vn=["right","left"],Sr=["top","bottom"],Mr=["bottom","top"];function Lr(e,t,n){switch(e){case"top":case"bottom":return n?t?vn:mn:t?mn:vn;case"left":case"right":return t?Sr:Mr;default:return[]}}function Tr(e,t,n,r){const o=Ye(e);let i=Lr(Ee(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Dt)))),i}function rt(e){const t=Ee(e);return wr[t]+e.slice(t.length)}function Dr(e){return{top:0,right:0,bottom:0,left:0,...e}}function hn(e){return typeof e!="number"?Dr(e):{top:e,right:e,bottom:e,left:e}}function ot(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}/*!
2
+ * tabbable 6.4.0
3
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
4
+ */var Rr=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Rt=Rr.join(","),gn=typeof Element>"u",_e=gn?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,st=!gn&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},it=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):it(t.parentNode));return s},Pr=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},kr=function(t,n,r){if(it(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Rt));return n&&_e.call(t,Rt)&&o.unshift(t),o=o.filter(r),o},Pt=function(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!it(s,!1))if(s.tagName==="SLOT"){var l=s.assignedElements(),a=l.length?l:s.children,c=Pt(a,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var f=_e.call(s,Rt);f&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),p=!it(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&p){var u=Pt(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:s,candidates:u})}else i.unshift.apply(i,s.children)}}return o},yn=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},bn=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Pr(t))&&!yn(t)?0:t.tabIndex},Ar=function(t,n){var r=bn(t);return r<0&&n&&!yn(t)?0:r},Nr=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},wn=function(t){return t.tagName==="INPUT"},Or=function(t){return wn(t)&&t.type==="hidden"},Cr=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},Ir=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},Fr=function(t){if(!t.name)return!0;var n=t.form||st(t),r=function(l){return n.querySelectorAll('input[type="radio"][name="'+l+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){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",s.message),!1}var i=Ir(o,t.form);return!i||i===t},Yr=function(t){return wn(t)&&t.type==="radio"},_r=function(t){return Yr(t)&&!Fr(t)},Br=function(t){var n,r=t&&st(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,l,a;for(i=!!((s=o)!==null&&s!==void 0&&(l=s.ownerDocument)!==null&&l!==void 0&&l.contains(o)||t!=null&&(a=t.ownerDocument)!==null&&a!==void 0&&a.contains(t));!i&&o;){var c,f,d;r=st(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((f=o)!==null&&f!==void 0&&(d=f.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},xn=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},$r=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var s=_e.call(t,"details>summary:first-of-type"),l=s?t.parentElement:t;if(_e.call(l,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var c=t.parentElement,f=st(t);if(c&&!c.shadowRoot&&o(c)===!0)return xn(t);t.assignedSlot?t=t.assignedSlot:!c&&f!==t.ownerDocument?t=f.host:t=c}t=a}if(Br(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return xn(t);return!1},Vr=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return _e.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Wr=function(t,n){return!(n.disabled||Or(n)||$r(n,t)||Cr(n)||Vr(n))},En=function(t,n){return!(_r(n)||bn(n)<0||!Wr(t,n))},Hr=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Sn=function(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,l=s?o.scopeParent:o,a=Ar(l,s),c=s?Sn(o.candidates):l;a===0?s?n.push.apply(n,c):n.push(l):r.push({documentOrder:i,tabIndex:a,item:o,isScope:s,content:c})}),r.sort(Nr).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Mn=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Pt([t],n.includeContainer,{filter:En.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Hr}):r=kr(t,n.includeContainer,En.bind(null,n)),Sn(r)};function Kr(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Ur(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function Ln(){return/apple/i.test(navigator.vendor)}function jr(){return Kr().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Xr(){return Ur().includes("jsdom/")}const Tn="data-floating-ui-focusable",zr="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function kt(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Re(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&wt(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Pe(e){return"composedPath"in e?e.composedPath()[0]:e.target}function At(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function qr(e){return e.matches("html,body")}function fe(e){return(e==null?void 0:e.ownerDocument)||document}function Gr(e){return oe(e)&&e.matches(zr)}function Zr(e){if(!e||Xr())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Jr(e){return e?e.hasAttribute(Tn)?e:e.querySelector("["+Tn+"]")||e:null}function lt(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...lt(e,o.id,n)])}function Qr(e){return"nativeEvent"in e}function Nt(e,t){const n=["mouse","pen"];return n.push("",void 0),n.includes(e)}var eo=typeof document<"u",to=function(){},ie=eo?$.useLayoutEffect:to;const no={...h};function ct(e){const t=h.useRef(e);return ie(()=>{t.current=e}),t}const ro=no.useInsertionEffect||(e=>e());function de(e){const t=h.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return ro(()=>{t.current=e}),h.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Dn=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Rn(e,t){const n=Mn(e,Dn()),r=n.length;if(r===0)return;const o=kt(fe(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function oo(e){return Rn(fe(e).body,1)||e}function so(e){return Rn(fe(e).body,-1)||e}function Ot(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Re(n,r)}function io(e){Mn(e,Dn()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Pn(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function kn(e,t,n){let{reference:r,floating:o}=e;const i=ye(t),s=Tt(t),l=Lt(s),a=Ee(t),c=i==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[l]/2-o[l]/2;let u;switch(a){case"top":u={x:f,y:r.y-o.height};break;case"bottom":u={x:f,y:r.y+r.height};break;case"right":u={x:r.x+r.width,y:d};break;case"left":u={x:r.x-o.width,y:d};break;default:u={x:r.x,y:r.y}}switch(Ye(t)){case"start":u[s]-=p*(n&&c?-1:1);break;case"end":u[s]+=p*(n&&c?-1:1);break}return u}async function lo(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:l,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:u=0}=Fe(t,e),v=hn(u),b=l[p?d==="floating"?"reference":"floating":d],g=ot(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:f,strategy:a})),E=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),L=await(i.isElement==null?void 0:i.isElement(S))?await(i.getScale==null?void 0:i.getScale(S))||{x:1,y:1}:{x:1,y:1},R=ot(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:E,offsetParent:S,strategy:a}):E);return{top:(g.top-R.top+v.top)/L.y,bottom:(R.bottom-g.bottom+v.bottom)/L.y,left:(g.left-R.left+v.left)/L.x,right:(R.right-g.right+v.right)/L.x}}const co=50,ao=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,l=s.detectOverflow?s:{...s,detectOverflow:lo},a=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=kn(c,r,a),p=r,u=0;const v={};for(let m=0;m<i.length;m++){const b=i[m];if(!b)continue;const{name:g,fn:E}=b,{x:S,y:L,data:R,reset:P}=await E({x:f,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:v,rects:c,platform:l,elements:{reference:e,floating:t}});f=S??f,d=L??d,v[g]={...v[g],...R},P&&u<co&&(u++,typeof P=="object"&&(P.placement&&(p=P.placement),P.rects&&(c=P.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):P.rects),{x:f,y:d}=kn(c,p,a)),m=-1)}return{x:f,y:d,placement:p,strategy:o,middlewareData:v}},uo=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:l,middlewareData:a}=t,{element:c,padding:f=0}=Fe(e,t)||{};if(c==null)return{};const d=hn(f),p={x:n,y:r},u=Tt(o),v=Lt(u),m=await s.getDimensions(c),b=u==="y",g=b?"top":"left",E=b?"bottom":"right",S=b?"clientHeight":"clientWidth",L=i.reference[v]+i.reference[u]-p[u]-i.floating[v],R=p[u]-i.reference[u],P=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let N=P?P[S]:0;(!N||!await(s.isElement==null?void 0:s.isElement(P)))&&(N=l.floating[S]||i.floating[v]);const M=L/2-R/2,I=N/2-m[v]/2-1,C=De(d[g],I),V=De(d[E],I),_=C,T=N-m[v]-V,x=N/2-m[v]/2+M,O=Mt(_,x,T),F=!a.arrow&&Ye(o)!=null&&x!==O&&i.reference[v]/2-(x<_?C:V)-m[v]/2<0,D=F?x<_?x-_:x-T:0;return{[u]:p[u]+D,data:{[u]:O,centerOffset:x-O-D,...F&&{alignmentOffset:D}},reset:F}}}),fo=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...b}=Fe(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=Ee(o),E=ye(l),S=Ee(l)===l,L=await(a.isRTL==null?void 0:a.isRTL(c.floating)),R=p||(S||!m?[rt(l)]:Er(l)),P=v!=="none";!p&&P&&R.push(...Tr(l,m,v,L));const N=[l,...R],M=await a.detectOverflow(t,b),I=[];let C=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&I.push(M[g]),d){const x=xr(o,s,L);I.push(M[x[0]],M[x[1]])}if(C=[...C,{placement:o,overflows:I}],!I.every(x=>x<=0)){var V,_;const x=(((V=i.flip)==null?void 0:V.index)||0)+1,O=N[x];if(O&&(!(d==="alignment"?E!==ye(O):!1)||C.every(w=>ye(w.placement)===E?w.overflows[0]>0:!0)))return{data:{index:x,overflows:C},reset:{placement:O}};let F=(_=C.filter(D=>D.overflows[0]<=0).sort((D,w)=>D.overflows[1]-w.overflows[1])[0])==null?void 0:_.placement;if(!F)switch(u){case"bestFit":{var T;const D=(T=C.filter(w=>{if(P){const A=ye(w.placement);return A===E||A==="y"}return!0}).map(w=>[w.placement,w.overflows.filter(A=>A>0).reduce((A,k)=>A+k,0)]).sort((w,A)=>w[1]-A[1])[0])==null?void 0:T[0];D&&(F=D);break}case"initialPlacement":F=l;break}if(o!==F)return{reset:{placement:F}}}return{}}}},po=new Set(["left","top"]);async function mo(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Ee(n),l=Ye(n),a=ye(n)==="y",c=po.has(s)?-1:1,f=i&&a?-1:1,d=Fe(t,e);let{mainAxis:p,crossAxis:u,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof v=="number"&&(u=l==="end"?v*-1:v),a?{x:u*f,y:p*c}:{x:p*c,y:u*f}}const vo=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:l}=t,a=await mo(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:s}}}}},ho=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:a={fn:g=>{let{x:E,y:S}=g;return{x:E,y:S}}},...c}=Fe(e,t),f={x:n,y:r},d=await i.detectOverflow(t,c),p=ye(Ee(o)),u=pn(p);let v=f[u],m=f[p];if(s){const g=u==="y"?"top":"left",E=u==="y"?"bottom":"right",S=v+d[g],L=v-d[E];v=Mt(S,v,L)}if(l){const g=p==="y"?"top":"left",E=p==="y"?"bottom":"right",S=m+d[g],L=m-d[E];m=Mt(S,m,L)}const b=a.fn({...t,[u]:v,[p]:m});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[u]:s,[p]:l}}}}}};function An(e){const t=re(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=oe(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,l=tt(n)!==i||tt(r)!==s;return l&&(n=i,r=s),{width:n,height:r,$:l}}function Ct(e){return z(e)?e:e.contextElement}function ke(e){const t=Ct(e);if(!oe(t))return ue(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=An(t);let s=(i?tt(n.width):n.width)/r,l=(i?tt(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const go=ue(0);function Nn(e){const t=ne(e);return!Qe()||!t.visualViewport?go:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yo(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ne(e)?!1:t}function Se(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ct(e);let s=ue(1);t&&(r?z(r)&&(s=ke(r)):s=ke(e));const l=yo(i,n,r)?Nn(i):ue(0);let a=(o.left+l.x)/s.x,c=(o.top+l.y)/s.y,f=o.width/s.x,d=o.height/s.y;if(i){const p=ne(i),u=r&&z(r)?ne(r):r;let v=p,m=St(v);for(;m&&r&&u!==v;){const b=ke(m),g=m.getBoundingClientRect(),E=re(m),S=g.left+(m.clientLeft+parseFloat(E.paddingLeft))*b.x,L=g.top+(m.clientTop+parseFloat(E.paddingTop))*b.y;a*=b.x,c*=b.y,f*=b.x,d*=b.y,a+=S,c+=L,v=ne(m),m=St(v)}}return ot({width:f,height:d,x:a,y:c})}function at(e,t){const n=et(e).scrollLeft;return t?t.left+n:Se(ae(e)).left+n}function On(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-at(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function bo(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=ae(r),l=t?Je(t.floating):!1;if(r===s||l&&i)return n;let a={scrollLeft:0,scrollTop:0},c=ue(1);const f=ue(0),d=oe(r);if((d||!d&&!i)&&((Te(r)!=="body"||Ie(s))&&(a=et(r)),d)){const u=Se(r);c=ke(r),f.x=u.x+r.clientLeft,f.y=u.y+r.clientTop}const p=s&&!d&&!i?On(s,a):ue(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+f.x+p.x,y:n.y*c.y-a.scrollTop*c.y+f.y+p.y}}function wo(e){return Array.from(e.getClientRects())}function xo(e){const t=ae(e),n=et(e),r=e.ownerDocument.body,o=xe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=xe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+at(e);const l=-n.scrollTop;return re(r).direction==="rtl"&&(s+=xe(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:l}}const Cn=25;function Eo(e,t){const n=ne(e),r=ae(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,l=0,a=0;if(o){i=o.width,s=o.height;const f=Qe();(!f||f&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}const c=at(r);if(c<=0){const f=r.ownerDocument,d=f.body,p=getComputedStyle(d),u=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,v=Math.abs(r.clientWidth-d.clientWidth-u);v<=Cn&&(i-=v)}else c<=Cn&&(i+=c);return{width:i,height:s,x:l,y:a}}function So(e,t){const n=Se(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=oe(e)?ke(e):ue(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,a=o*i.x,c=r*i.y;return{width:s,height:l,x:a,y:c}}function In(e,t,n){let r;if(t==="viewport")r=Eo(e,n);else if(t==="document")r=xo(ae(e));else if(z(t))r=So(t,n);else{const o=Nn(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ot(r)}function Fn(e,t){const n=he(e);return n===t||!z(n)||ve(n)?!1:re(n).position==="fixed"||Fn(n,t)}function Mo(e,t){const n=t.get(e);if(n)return n;let r=ge(e,[],!1).filter(l=>z(l)&&Te(l)!=="body"),o=null;const i=re(e).position==="fixed";let s=i?he(e):e;for(;z(s)&&!ve(s);){const l=re(s),a=Et(s);!a&&l.position==="fixed"&&(o=null),(i?!a&&!o:!a&&l.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Ie(s)&&!a&&Fn(e,s))?r=r.filter(f=>f!==s):o=l,s=he(s)}return t.set(e,r),r}function Lo(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Je(t)?[]:Mo(t,this._c):[].concat(n),r],l=In(t,s[0],o);let a=l.top,c=l.right,f=l.bottom,d=l.left;for(let p=1;p<s.length;p++){const u=In(t,s[p],o);a=xe(u.top,a),c=De(u.right,c),f=De(u.bottom,f),d=xe(u.left,d)}return{width:c-d,height:f-a,x:d,y:a}}function To(e){const{width:t,height:n}=An(e);return{width:t,height:n}}function Do(e,t,n){const r=oe(t),o=ae(t),i=n==="fixed",s=Se(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const a=ue(0);function c(){a.x=at(o)}if(r||!r&&!i)if((Te(t)!=="body"||Ie(o))&&(l=et(t)),r){const u=Se(t,!0,i,t);a.x=u.x+t.clientLeft,a.y=u.y+t.clientTop}else o&&c();i&&!r&&o&&c();const f=o&&!r&&!i?On(o,l):ue(0),d=s.left+l.scrollLeft-a.x-f.x,p=s.top+l.scrollTop-a.y-f.y;return{x:d,y:p,width:s.width,height:s.height}}function It(e){return re(e).position==="static"}function Yn(e,t){if(!oe(e)||re(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ae(e)===n&&(n=n.ownerDocument.body),n}function _n(e,t){const n=ne(e);if(Je(e))return n;if(!oe(e)){let o=he(e);for(;o&&!ve(o);){if(z(o)&&!It(o))return o;o=he(o)}return n}let r=Yn(e,t);for(;r&&hr(r)&&It(r);)r=Yn(r,t);return r&&ve(r)&&It(r)&&!Et(r)?n:r||br(e)||n}const Ro=async function(e){const t=this.getOffsetParent||_n,n=this.getDimensions,r=await n(e.floating);return{reference:Do(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Po(e){return re(e).direction==="rtl"}const ko={convertOffsetParentRelativeRectToViewportRelativeRect:bo,getDocumentElement:ae,getClippingRect:Lo,getOffsetParent:_n,getElementRects:Ro,getClientRects:wo,getDimensions:To,getScale:ke,isElement:z,isRTL:Po};function Bn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ao(e,t){let n=null,r;const o=ae(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function s(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),i();const c=e.getBoundingClientRect(),{left:f,top:d,width:p,height:u}=c;if(l||t(),!p||!u)return;const v=nt(d),m=nt(o.clientWidth-(f+p)),b=nt(o.clientHeight-(d+u)),g=nt(f),S={rootMargin:-v+"px "+-m+"px "+-b+"px "+-g+"px",threshold:xe(0,De(1,a))||1};let L=!0;function R(P){const N=P[0].intersectionRatio;if(N!==a){if(!L)return s();N?s(!1,N):r=setTimeout(()=>{s(!1,1e-7)},1e3)}N===1&&!Bn(c,e.getBoundingClientRect())&&s(),L=!1}try{n=new IntersectionObserver(R,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(R,S)}n.observe(e)}return s(!0),i}function No(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,c=Ct(e),f=o||i?[...c?ge(c):[],...t?ge(t):[]]:[];f.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const d=c&&l?Ao(c,n):null;let p=-1,u=null;s&&(u=new ResizeObserver(g=>{let[E]=g;E&&E.target===c&&u&&t&&(u.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=u)==null||S.observe(t)})),n()}),c&&!a&&u.observe(c),t&&u.observe(t));let v,m=a?Se(e):null;a&&b();function b(){const g=Se(e);m&&!Bn(m,g)&&n(),m=g,v=requestAnimationFrame(b)}return n(),()=>{var g;f.forEach(E=>{o&&E.removeEventListener("scroll",n),i&&E.removeEventListener("resize",n)}),d==null||d(),(g=u)==null||g.disconnect(),u=null,a&&cancelAnimationFrame(v)}}const Oo=vo,Co=ho,Io=fo,$n=uo,Fo=(e,t,n)=>{const r=new Map,o={platform:ko,...n},i={...o.platform,_c:r};return ao(e,t,{...o,platform:i})};var Yo=typeof document<"u",_o=function(){},ut=Yo?$.useLayoutEffect:_o;function ft(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ft(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!ft(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Vn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Wn(e,t){const n=Vn(e);return Math.round(t*n)/n}function Ft(e){const t=h.useRef(e);return ut(()=>{t.current=e}),t}function Bo(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:a,open:c}=e,[f,d]=h.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,u]=h.useState(r);ft(p,r)||u(r);const[v,m]=h.useState(null),[b,g]=h.useState(null),E=h.useCallback(w=>{w!==P.current&&(P.current=w,m(w))},[]),S=h.useCallback(w=>{w!==N.current&&(N.current=w,g(w))},[]),L=i||v,R=s||b,P=h.useRef(null),N=h.useRef(null),M=h.useRef(f),I=a!=null,C=Ft(a),V=Ft(o),_=Ft(c),T=h.useCallback(()=>{if(!P.current||!N.current)return;const w={placement:t,strategy:n,middleware:p};V.current&&(w.platform=V.current),Fo(P.current,N.current,w).then(A=>{const k={...A,isPositioned:_.current!==!1};x.current&&!ft(M.current,k)&&(M.current=k,Qt.flushSync(()=>{d(k)}))})},[p,t,n,V,_]);ut(()=>{c===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,d(w=>({...w,isPositioned:!1})))},[c]);const x=h.useRef(!1);ut(()=>(x.current=!0,()=>{x.current=!1}),[]),ut(()=>{if(L&&(P.current=L),R&&(N.current=R),L&&R){if(C.current)return C.current(L,R,T);T()}},[L,R,T,C,I]);const O=h.useMemo(()=>({reference:P,floating:N,setReference:E,setFloating:S}),[E,S]),F=h.useMemo(()=>({reference:L,floating:R}),[L,R]),D=h.useMemo(()=>{const w={position:n,left:0,top:0};if(!F.floating)return w;const A=Wn(F.floating,f.x),k=Wn(F.floating,f.y);return l?{...w,transform:"translate("+A+"px, "+k+"px)",...Vn(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:k}},[n,l,F.floating,f.x,f.y]);return h.useMemo(()=>({...f,update:T,refs:O,elements:F,floatingStyles:D}),[f,T,O,F,D])}const $o=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?$n({element:r.current,padding:o}).fn(n):{}:r?$n({element:r,padding:o}).fn(n):{}}}},Vo=(e,t)=>{const n=Oo(e);return{name:n.name,fn:n.fn,options:[e,t]}},Wo=(e,t)=>{const n=Co(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ho=(e,t)=>{const n=Io(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ko=(e,t)=>{const n=$o(e);return{name:n.name,fn:n.fn,options:[e,t]}};function Uo(e){const t=h.useRef(void 0),n=h.useCallback(r=>{const o=e.map(i=>{if(i!=null){if(typeof i=="function"){const s=i,l=s(r);return typeof l=="function"?l:()=>{s(null)}}return i.current=r,()=>{i.current=null}}});return()=>{o.forEach(i=>i==null?void 0:i())}},e);return h.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}const jo="data-floating-ui-focusable",Hn="active",Kn="selected",Xo={...h};let Un=!1,zo=0;const jn=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+zo++;function qo(){const[e,t]=h.useState(()=>Un?jn():void 0);return ie(()=>{e==null&&t(jn())},[]),h.useEffect(()=>{Un=!0},[]),e}const dt=Xo.useId||qo;let Be;process.env.NODE_ENV!=="production"&&(Be=new Set);function Go(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Be)!=null&&e.has(o))){var i;(i=Be)==null||i.add(o),console.warn(o)}}function Zo(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Be)!=null&&e.has(o))){var i;(i=Be)==null||i.add(o),console.error(o)}}const Jo=h.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:s}},width:l=14,height:a=7,tipRadius:c=0,strokeWidth:f=0,staticOffset:d,stroke:p,d:u,style:{transform:v,...m}={},...b}=t;process.env.NODE_ENV!=="production"&&(n||Go("The `ref` prop is required for `FloatingArrow`."));const g=dt(),[E,S]=h.useState(!1);if(ie(()=>{if(!o)return;re(o).direction==="rtl"&&S(!0)},[o]),!o)return null;const[L,R]=r.split("-"),P=L==="top"||L==="bottom";let N=d;(P&&s!=null&&s.x||!P&&s!=null&&s.y)&&(N=null);const M=f*2,I=M/2,C=l/2*(c/-8+1),V=a/2*c/4,_=!!u,T=N&&R==="end"?"bottom":"top";let x=N&&R==="end"?"right":"left";N&&E&&(x=R==="end"?"left":"right");const O=(i==null?void 0:i.x)!=null?N||i.x:"",F=(i==null?void 0:i.y)!=null?N||i.y:"",D=u||"M0,0"+(" H"+l)+(" L"+(l-C)+","+(a-V))+(" Q"+l/2+","+a+" "+C+","+(a-V))+" Z",w={top:_?"rotate(180deg)":"",left:_?"rotate(90deg)":"rotate(-90deg)",bottom:_?"":"rotate(180deg)",right:_?"rotate(-90deg)":"rotate(90deg)"}[L];return y.jsxs("svg",{...b,"aria-hidden":!0,ref:n,width:_?l:l+M,height:l,viewBox:"0 0 "+l+" "+(a>l?a:l),style:{position:"absolute",pointerEvents:"none",[x]:O,[T]:F,[L]:P||_?"100%":"calc(100% - "+M/2+"px)",transform:[w,v].filter(A=>!!A).join(" "),...m},children:[M>0&&y.jsx("path",{clipPath:"url(#"+g+")",fill:"none",stroke:p,strokeWidth:M+(u?0:1),d:D}),y.jsx("path",{stroke:M&&!u?b.fill:"none",d:D}),y.jsx("clipPath",{id:g,children:y.jsx("rect",{x:-I,y:I*(_?-1:1),width:l+M,height:l})})]})});function Qo(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const es=h.createContext(null),ts=h.createContext(null),Yt=()=>{var e;return((e=h.useContext(es))==null?void 0:e.id)||null},_t=()=>h.useContext(ts);function $e(e){return"data-floating-ui-"+e}function se(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const Xn=$e("safe-polygon");function Bt(e,t,n){if(n&&!Nt(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r==null?void 0:r[t]}return e==null?void 0:e[t]}function $t(e){return typeof e=="function"?e():e}function ns(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:l=!0,delay:a=0,handleClose:c=null,mouseOnly:f=!1,restMs:d=0,move:p=!0}=t,u=_t(),v=Yt(),m=ct(c),b=ct(a),g=ct(n),E=ct(d),S=h.useRef(),L=h.useRef(-1),R=h.useRef(),P=h.useRef(-1),N=h.useRef(!0),M=h.useRef(!1),I=h.useRef(()=>{}),C=h.useRef(!1),V=de(()=>{var D;const w=(D=o.current.openEvent)==null?void 0:D.type;return(w==null?void 0:w.includes("mouse"))&&w!=="mousedown"});h.useEffect(()=>{if(!l)return;function D(w){let{open:A}=w;A||(se(L),se(P),N.current=!0,C.current=!1)}return i.on("openchange",D),()=>{i.off("openchange",D)}},[l,i]),h.useEffect(()=>{if(!l||!m.current||!n)return;function D(A){V()&&r(!1,A,"hover")}const w=fe(s.floating).documentElement;return w.addEventListener("mouseleave",D),()=>{w.removeEventListener("mouseleave",D)}},[s.floating,n,r,l,m,V]);const _=h.useCallback(function(D,w,A){w===void 0&&(w=!0),A===void 0&&(A="hover");const k=Bt(b.current,"close",S.current);k&&!R.current?(se(L),L.current=window.setTimeout(()=>r(!1,D,A),k)):w&&(se(L),r(!1,D,A))},[b,r]),T=de(()=>{I.current(),R.current=void 0}),x=de(()=>{if(M.current){const D=fe(s.floating).body;D.style.pointerEvents="",D.removeAttribute(Xn),M.current=!1}}),O=de(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);h.useEffect(()=>{if(!l)return;function D(B){if(se(L),N.current=!1,f&&!Nt(S.current)||$t(E.current)>0&&!Bt(b.current,"open"))return;const q=Bt(b.current,"open",S.current);q?L.current=window.setTimeout(()=>{g.current||r(!0,B,"hover")},q):n||r(!0,B,"hover")}function w(B){if(O()){x();return}I.current();const q=fe(s.floating);if(se(P),C.current=!1,m.current&&o.current.floatingContext){n||se(L),R.current=m.current({...o.current.floatingContext,tree:u,x:B.clientX,y:B.clientY,onClose(){x(),T(),O()||_(B,!0,"safe-polygon")}});const j=R.current;q.addEventListener("mousemove",j),I.current=()=>{q.removeEventListener("mousemove",j)};return}(S.current==="touch"?!Re(s.floating,B.relatedTarget):!0)&&_(B)}function A(B){O()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:u,x:B.clientX,y:B.clientY,onClose(){x(),T(),O()||_(B)}})(B))}function k(){se(L)}function W(B){O()||_(B,!1)}if(z(s.domReference)){const B=s.domReference,q=s.floating;return n&&B.addEventListener("mouseleave",A),p&&B.addEventListener("mousemove",D,{once:!0}),B.addEventListener("mouseenter",D),B.addEventListener("mouseleave",w),q&&(q.addEventListener("mouseleave",A),q.addEventListener("mouseenter",k),q.addEventListener("mouseleave",W)),()=>{n&&B.removeEventListener("mouseleave",A),p&&B.removeEventListener("mousemove",D),B.removeEventListener("mouseenter",D),B.removeEventListener("mouseleave",w),q&&(q.removeEventListener("mouseleave",A),q.removeEventListener("mouseenter",k),q.removeEventListener("mouseleave",W))}}},[s,l,e,f,p,_,T,x,r,n,g,u,b,m,o,O,E]),ie(()=>{var D;if(l&&n&&(D=m.current)!=null&&(D=D.__options)!=null&&D.blockPointerEvents&&V()){M.current=!0;const A=s.floating;if(z(s.domReference)&&A){var w;const k=fe(s.floating).body;k.setAttribute(Xn,"");const W=s.domReference,B=u==null||(w=u.nodesRef.current.find(q=>q.id===v))==null||(w=w.context)==null?void 0:w.elements.floating;return B&&(B.style.pointerEvents=""),k.style.pointerEvents="none",W.style.pointerEvents="auto",A.style.pointerEvents="auto",()=>{k.style.pointerEvents="",W.style.pointerEvents="",A.style.pointerEvents=""}}}},[l,n,v,s,u,m,V]),ie(()=>{n||(S.current=void 0,C.current=!1,T(),x())},[n,T,x]),h.useEffect(()=>()=>{T(),se(L),se(P),x()},[l,s.domReference,T,x]);const F=h.useMemo(()=>{function D(w){S.current=w.pointerType}return{onPointerDown:D,onPointerEnter:D,onMouseMove(w){const{nativeEvent:A}=w;function k(){!N.current&&!g.current&&r(!0,A,"hover")}f&&!Nt(S.current)||n||$t(E.current)===0||C.current&&w.movementX**2+w.movementY**2<2||(se(P),S.current==="touch"?k():(C.current=!0,P.current=window.setTimeout(k,$t(E.current))))}}},[f,r,n,g,E]);return h.useMemo(()=>l?{reference:F}:{},[l,F])}const rs={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},zn=h.forwardRef(function(t,n){const[r,o]=h.useState();ie(()=>{Ln()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[$e("focus-guard")]:"",style:rs};return y.jsx("span",{...t,...i})}),os={clipPath:"inset(50%)",position:"fixed",top:0,left:0},qn=h.createContext(null),Gn=$e("portal");function ss(e){e===void 0&&(e={});const{id:t,root:n}=e,r=dt(),o=ls(),[i,s]=h.useState(null),l=h.useRef(null);return ie(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{l.current=null})},[i]),ie(()=>{if(!r||l.current)return;const a=t?document.getElementById(t):null;if(!a)return;const c=document.createElement("div");c.id=r,c.setAttribute(Gn,""),a.appendChild(c),l.current=c,s(c)},[t,r]),ie(()=>{if(n===null||!r||l.current)return;let a=n||(o==null?void 0:o.portalNode);a&&!bt(a)&&(a=a.current),a=a||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,a.appendChild(c));const f=document.createElement("div");f.id=r,f.setAttribute(Gn,""),a=c||a,a.appendChild(f),l.current=f,s(f)},[t,n,r,o]),i}function is(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=ss({id:n,root:r}),[s,l]=h.useState(null),a=h.useRef(null),c=h.useRef(null),f=h.useRef(null),d=h.useRef(null),p=s==null?void 0:s.modal,u=s==null?void 0:s.open,v=!!s&&!s.modal&&s.open&&o&&!!(r||i);return h.useEffect(()=>{if(!i||!o||p)return;function m(b){i&&Ot(b)&&(b.type==="focusin"?Pn:io)(i)}return i.addEventListener("focusin",m,!0),i.addEventListener("focusout",m,!0),()=>{i.removeEventListener("focusin",m,!0),i.removeEventListener("focusout",m,!0)}},[i,o,p]),h.useEffect(()=>{i&&(u||Pn(i))},[u,i]),y.jsxs(qn.Provider,{value:h.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:a,afterOutsideRef:c,beforeInsideRef:f,afterInsideRef:d,portalNode:i,setFocusManagerState:l}),[o,i]),children:[v&&i&&y.jsx(zn,{"data-type":"outside",ref:a,onFocus:m=>{if(Ot(m,i)){var b;(b=f.current)==null||b.focus()}else{const g=s?s.domReference:null,E=so(g);E==null||E.focus()}}}),v&&i&&y.jsx("span",{"aria-owns":i.id,style:os}),i&&Qt.createPortal(t,i),v&&i&&y.jsx(zn,{"data-type":"outside",ref:c,onFocus:m=>{if(Ot(m,i)){var b;(b=d.current)==null||b.focus()}else{const g=s?s.domReference:null,E=oo(g);E==null||E.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,m.nativeEvent,"focus-out"))}}})]})}const ls=()=>h.useContext(qn),cs={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},as={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Zn=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function us(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:l=!0,outsidePress:a=!0,outsidePressEvent:c="pointerdown",referencePress:f=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:u,capture:v}=t,m=_t(),b=de(typeof a=="function"?a:()=>!1),g=typeof a=="function"?b:a,E=h.useRef(!1),{escapeKey:S,outsidePress:L}=Zn(u),{escapeKey:R,outsidePress:P}=Zn(v),N=h.useRef(!1),M=de(x=>{var O;if(!n||!s||!l||x.key!=="Escape"||N.current)return;const F=(O=i.current.floatingContext)==null?void 0:O.nodeId,D=m?lt(m.nodesRef.current,F):[];if(!S&&(x.stopPropagation(),D.length>0)){let w=!0;if(D.forEach(A=>{var k;if((k=A.context)!=null&&k.open&&!A.context.dataRef.current.__escapeKeyBubbles){w=!1;return}}),!w)return}r(!1,Qr(x)?x.nativeEvent:x,"escape-key")}),I=de(x=>{var O;const F=()=>{var D;M(x),(D=Pe(x))==null||D.removeEventListener("keydown",F)};(O=Pe(x))==null||O.addEventListener("keydown",F)}),C=de(x=>{var O;const F=i.current.insideReactTree;i.current.insideReactTree=!1;const D=E.current;if(E.current=!1,c==="click"&&D||F||typeof g=="function"&&!g(x))return;const w=Pe(x),A="["+$e("inert")+"]",k=fe(o.floating).querySelectorAll(A);let W=z(w)?w:null;for(;W&&!ve(W);){const j=he(W);if(ve(j)||!z(j))break;W=j}if(k.length&&z(w)&&!qr(w)&&!Re(w,o.floating)&&Array.from(k).every(j=>!Re(W,j)))return;if(oe(w)&&T){const j=ve(w),X=re(w),ee=/auto|scroll/,Kt=j||ee.test(X.overflowX),Ae=j||ee.test(X.overflowY),Ut=Kt&&w.clientWidth>0&&w.scrollWidth>w.clientWidth,Me=Ae&&w.clientHeight>0&&w.scrollHeight>w.clientHeight,Le=X.direction==="rtl",Ne=Me&&(Le?x.offsetX<=w.offsetWidth-w.clientWidth:x.offsetX>w.clientWidth),Oe=Ut&&x.offsetY>w.clientHeight;if(Ne||Oe)return}const B=(O=i.current.floatingContext)==null?void 0:O.nodeId,q=m&&lt(m.nodesRef.current,B).some(j=>{var X;return At(x,(X=j.context)==null?void 0:X.elements.floating)});if(At(x,o.floating)||At(x,o.domReference)||q)return;const Ve=m?lt(m.nodesRef.current,B):[];if(Ve.length>0){let j=!0;if(Ve.forEach(X=>{var ee;if((ee=X.context)!=null&&ee.open&&!X.context.dataRef.current.__outsidePressBubbles){j=!1;return}}),!j)return}r(!1,x,"outside-press")}),V=de(x=>{var O;const F=()=>{var D;C(x),(D=Pe(x))==null||D.removeEventListener(c,F)};(O=Pe(x))==null||O.addEventListener(c,F)});h.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=L;let x=-1;function O(k){r(!1,k,"ancestor-scroll")}function F(){window.clearTimeout(x),N.current=!0}function D(){x=window.setTimeout(()=>{N.current=!1},Qe()?5:0)}const w=fe(o.floating);l&&(w.addEventListener("keydown",R?I:M,R),w.addEventListener("compositionstart",F),w.addEventListener("compositionend",D)),g&&w.addEventListener(c,P?V:C,P);let A=[];return p&&(z(o.domReference)&&(A=ge(o.domReference)),z(o.floating)&&(A=A.concat(ge(o.floating))),!z(o.reference)&&o.reference&&o.reference.contextElement&&(A=A.concat(ge(o.reference.contextElement)))),A=A.filter(k=>{var W;return k!==((W=w.defaultView)==null?void 0:W.visualViewport)}),A.forEach(k=>{k.addEventListener("scroll",O,{passive:!0})}),()=>{l&&(w.removeEventListener("keydown",R?I:M,R),w.removeEventListener("compositionstart",F),w.removeEventListener("compositionend",D)),g&&w.removeEventListener(c,P?V:C,P),A.forEach(k=>{k.removeEventListener("scroll",O)}),window.clearTimeout(x)}},[i,o,l,g,c,n,r,p,s,S,L,M,R,I,C,P,V]),h.useEffect(()=>{i.current.insideReactTree=!1},[i,g,c]);const _=h.useMemo(()=>({onKeyDown:M,...f&&{[cs[d]]:x=>{r(!1,x.nativeEvent,"reference-press")},...d!=="click"&&{onClick(x){r(!1,x.nativeEvent,"reference-press")}}}}),[M,r,f,d]),T=h.useMemo(()=>{function x(O){O.button===0&&(E.current=!0)}return{onKeyDown:M,onMouseDown:x,onMouseUp:x,[as[c]]:()=>{i.current.insideReactTree=!0}}},[M,c,i]);return h.useMemo(()=>s?{reference:_,floating:T}:{},[s,_,T])}function fs(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=dt(),i=h.useRef({}),[s]=h.useState(()=>Qo()),l=Yt()!=null;if(process.env.NODE_ENV!=="production"){const u=r.reference;u&&!z(u)&&Zo("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[a,c]=h.useState(r.reference),f=de((u,v,m)=>{i.current.openEvent=u?v:void 0,s.emit("openchange",{open:u,event:v,reason:m,nested:l}),n==null||n(u,v,m)}),d=h.useMemo(()=>({setPositionReference:c}),[]),p=h.useMemo(()=>({reference:a||r.reference||null,floating:r.floating||null,domReference:r.reference}),[a,r.reference,r.floating]);return h.useMemo(()=>({dataRef:i,open:t,onOpenChange:f,elements:p,events:s,floatingId:o,refs:d}),[t,f,p,s,o,d])}function ds(e){e===void 0&&(e={});const{nodeId:t}=e,n=fs({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=h.useState(null),[l,a]=h.useState(null),f=(o==null?void 0:o.domReference)||i,d=h.useRef(null),p=_t();ie(()=>{f&&(d.current=f)},[f]);const u=Bo({...e,elements:{...o,...l&&{reference:l}}}),v=h.useCallback(S=>{const L=z(S)?{getBoundingClientRect:()=>S.getBoundingClientRect(),getClientRects:()=>S.getClientRects(),contextElement:S}:S;a(L),u.refs.setReference(L)},[u.refs]),m=h.useCallback(S=>{(z(S)||S===null)&&(d.current=S,s(S)),(z(u.refs.reference.current)||u.refs.reference.current===null||S!==null&&!z(S))&&u.refs.setReference(S)},[u.refs]),b=h.useMemo(()=>({...u.refs,setReference:m,setPositionReference:v,domReference:d}),[u.refs,m,v]),g=h.useMemo(()=>({...u.elements,domReference:f}),[u.elements,f]),E=h.useMemo(()=>({...u,...r,refs:b,elements:g,nodeId:t}),[u,b,g,t,r]);return ie(()=>{r.dataRef.current.floatingContext=E;const S=p==null?void 0:p.nodesRef.current.find(L=>L.id===t);S&&(S.context=E)}),h.useMemo(()=>({...u,context:E,refs:b,elements:g}),[u,b,g,E])}function Vt(){return jr()&&Ln()}function ps(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=e,{enabled:l=!0,visibleOnly:a=!0}=t,c=h.useRef(!1),f=h.useRef(-1),d=h.useRef(!0);h.useEffect(()=>{if(!l)return;const u=ne(s.domReference);function v(){!n&&oe(s.domReference)&&s.domReference===kt(fe(s.domReference))&&(c.current=!0)}function m(){d.current=!0}function b(){d.current=!1}return u.addEventListener("blur",v),Vt()&&(u.addEventListener("keydown",m,!0),u.addEventListener("pointerdown",b,!0)),()=>{u.removeEventListener("blur",v),Vt()&&(u.removeEventListener("keydown",m,!0),u.removeEventListener("pointerdown",b,!0))}},[s.domReference,n,l]),h.useEffect(()=>{if(!l)return;function u(v){let{reason:m}=v;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",u),()=>{o.off("openchange",u)}},[o,l]),h.useEffect(()=>()=>{se(f)},[]);const p=h.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(u){if(c.current)return;const v=Pe(u.nativeEvent);if(a&&z(v)){if(Vt()&&!u.relatedTarget){if(!d.current&&!Gr(v))return}else if(!Zr(v))return}r(!0,u.nativeEvent,"focus")},onBlur(u){c.current=!1;const v=u.relatedTarget,m=u.nativeEvent,b=z(v)&&v.hasAttribute($e("focus-guard"))&&v.getAttribute("data-type")==="outside";f.current=window.setTimeout(()=>{var g;const E=kt(s.domReference?s.domReference.ownerDocument:document);!v&&E===s.domReference||Re((g=i.current.floatingContext)==null?void 0:g.refs.floating.current,E)||Re(s.domReference,E)||b||r(!1,m,"focus")})}}),[i,s.domReference,r,a]);return h.useMemo(()=>l?{reference:p}:{},[l,p])}function Wt(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Hn]:s,[Kn]:l,...a}=e;i=a}return{...n==="floating"&&{tabIndex:-1,[jo]:""},...i,...t.map(s=>{const l=s?s[n]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((s,l)=>(l&&Object.entries(l).forEach(a=>{let[c,f]=a;if(!(o&&[Hn,Kn].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof f=="function"){var d;(d=r.get(c))==null||d.push(f),s[c]=function(){for(var p,u=arguments.length,v=new Array(u),m=0;m<u;m++)v[m]=arguments[m];return(p=r.get(c))==null?void 0:p.map(b=>b(...v)).find(b=>b!==void 0)}}}else s[c]=f}),s),{})}}function ms(e){e===void 0&&(e=[]);const t=e.map(l=>l==null?void 0:l.reference),n=e.map(l=>l==null?void 0:l.floating),r=e.map(l=>l==null?void 0:l.item),o=h.useCallback(l=>Wt(l,e,"reference"),t),i=h.useCallback(l=>Wt(l,e,"floating"),n),s=h.useCallback(l=>Wt(l,e,"item"),r);return h.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}const vs=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function hs(e,t){var n,r;t===void 0&&(t={});const{open:o,elements:i,floatingId:s}=e,{enabled:l=!0,role:a="dialog"}=t,c=dt(),f=((n=i.domReference)==null?void 0:n.id)||c,d=h.useMemo(()=>{var E;return((E=Jr(i.floating))==null?void 0:E.id)||s},[i.floating,s]),p=(r=vs.get(a))!=null?r:a,v=Yt()!=null,m=h.useMemo(()=>p==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":p==="alertdialog"?"dialog":p,"aria-controls":o?d:void 0,...p==="listbox"&&{role:"combobox"},...p==="menu"&&{id:f},...p==="menu"&&v&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[p,d,v,o,f,a]),b=h.useMemo(()=>{const E={id:d,...p&&{role:p}};return p==="tooltip"||a==="label"?E:{...E,...p==="menu"&&{"aria-labelledby":f}}},[p,d,f,a]),g=h.useCallback(E=>{let{active:S,selected:L}=E;const R={role:"option",...S&&{id:d+"-fui-option"}};switch(a){case"select":case"combobox":return{...R,"aria-selected":L}}return{}},[d,a]);return h.useMemo(()=>l?{reference:m,floating:b,item:g}:{},[l,m,b,g])}function Jn({content:e,renderProps:t,delay:n=300,placement:r="top",classNames:o={},styles:i={},children:s}){const[l,a]=$.useState(!1),[c,f]=$.useState(null),d=typeof e=="function"?e(t):e,p=d!=null,{refs:u,floatingStyles:v,context:m}=ds({open:l&&p,onOpenChange:a,placement:r,strategy:"fixed",transform:!1,whileElementsMounted:No,middleware:[Vo(8),Ho({padding:8}),Wo({padding:8}),Ko({element:c})]}),b=ns(m,{move:!1,delay:{open:n,close:0}}),g=ps(m),E=us(m),S=hs(m,{role:"tooltip"}),{getReferenceProps:L,getFloatingProps:R}=ms([b,g,E,S]),P=s.ref,N=Uo([u.setReference,P??null]),M=$.cloneElement(s,L({...s.props,ref:N})),I=u.reference.current,C=(I instanceof HTMLElement?I.closest(".fldp-root"):null)??void 0;return y.jsxs(y.Fragment,{children:[M,l&&p&&y.jsx(is,{root:C,children:y.jsxs("div",{ref:u.setFloating,className:U("fldp-tooltip",o.tooltip),style:{...v,...i.tooltip},...R(),children:[d,y.jsx(Jo,{ref:f,context:m,style:{fill:"var(--fldp-foreground)"},width:10,height:5})]})})]})}function Qn({date:e,isOutside:t}){var B;const{mode:n,singleValue:r,rangeValue:o,hoveredDate:i,selectDate:s,setHoveredDate:l,disabled:a,isDisabled:c,readOnly:f,highlightToday:d,showAdjacentMonthDays:p,locale:u,tooltip:v,tooltipDelay:m,classNames:b,styles:g,renderDay:E,onDayHover:S}=ze(),L=((B=e.isToday)==null?void 0:B.call(e))??e.isSame(new Date,"day"),R=c||on(e,a),P=n==="single"?ce(e,r):ce(e,o.start)&&ce(e,o.end),N=n==="range"?ht(e,o):!1,M=n==="range"?gt(e,o):!1,I=n==="range"?qe(e,o.start,o.end):!1,C=n==="range"&&o.start&&!o.end&&i?{start:o.start,end:i}:null,V=C?qe(e,C.start,C.end)||ce(e,C.end):!1,_=C?ce(e,C.start):!1,T=C?ce(e,C.end):!1,x=n==="range"?o.end??(C==null?void 0:C.end)??null:null,O=n==="range"&&o.start&&x&&x.diff(o.start,"day")||null,F={date:e,isToday:L,isSelected:P||N||M,isDisabled:R,isRangeStart:N,isRangeEnd:M,isInRange:I||V,isRangeSelecting:n==="range"&&!!o.start&&!o.end,isInPreviewRange:V,isPreviewRangeEnd:T,rangeStart:n==="range"?o.start??null:null,rangeEnd:x,nights:O};if(t&&!p)return y.jsx("div",{className:"fldp-day fldp-day--outside","aria-hidden":"true"});function D(){R||f||s(e)}function w(){l(e),S==null||S(e)}function A(){l(null),S==null||S(null)}function k(q){(q.key==="Enter"||q.key===" ")&&(q.preventDefault(),D())}const W=y.jsx("div",{onClick:D,onMouseEnter:w,onMouseLeave:A,onKeyDown:k,"aria-pressed":P||N||M,"aria-disabled":R,"aria-label":e.locale(u??"en").format("MMMM D, YYYY"),role:"button",tabIndex:R?-1:0,className:U("fldp-day",L&&d&&"fldp-day--today",P&&"fldp-day--selected",N&&!M&&"fldp-day--range-start",M&&!N&&"fldp-day--range-end",N&&M&&"fldp-day--selected",I&&"fldp-day--in-range",(V||_)&&!I&&!N&&!M&&"fldp-day--hovered-range",R&&"fldp-day--disabled",t&&"fldp-day--outside",(V||_)&&b.dayHovered,b.day,L&&b.dayToday,P&&b.daySelected,N&&b.dayRangeStart,M&&b.dayRangeEnd,I&&b.dayInRange,R&&b.dayDisabled,t&&b.dayOutside),style:{...g.day,...L&&g.dayToday,...P&&g.daySelected,...N&&g.dayRangeStart,...M&&g.dayRangeEnd,...I&&g.dayInRange,...R&&g.dayDisabled,...t&&g.dayOutside,...(V||_)&&g.dayHovered},children:E?E(e,F):y.jsx("span",{className:"fldp-day-number",children:e.date()})});return v?y.jsx(Jn,{content:v,renderProps:F,delay:m,classNames:b,styles:g,children:W}):W}function er({panelIndex:e=0,totalPanels:t=1}){const{currentYear:n,currentMonth:r,weekStartsOn:o,locale:i,classNames:s,styles:l}=ze(),a=r+e,c=n+Math.floor(a/12),f=a%12,d=sn(c,f,o),p=ln(o,i);return y.jsxs("div",{role:"grid","aria-label":`${Q(new Date(c,f)).locale(i??"en").format("MMMM YYYY")}`,className:U("fldp-calendar",s.calendar),style:l.calendar,children:[y.jsx(fn,{panelIndex:e,totalPanels:t}),y.jsx("div",{role:"row",className:U("fldp-weekdays",s.weekdays),style:l.weekdays,children:p.map(u=>y.jsx("div",{role:"columnheader","aria-label":u,className:U("fldp-weekday",s.weekday),style:l.weekday,children:u},u))}),y.jsx("div",{role:"rowgroup",className:U("fldp-days-grid",s.daysGrid),style:l.daysGrid,children:d.map(u=>{const v=u.month()!==f||u.year()!==c;return y.jsx(Qn,{date:u,isOutside:v},u.format("YYYY-MM-DD"))})})]})}function gs(){return y.jsxs("svg",{className:"fldp-calendar-icon",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[y.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),y.jsx("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),y.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),y.jsx("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]})}function ys(){return y.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"currentColor","aria-hidden":"true",children:[y.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),y.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}function bs({mode:e,singleValue:t,rangeValue:n,format:r,locale:o,placeholder:i,isOpen:s,isDisabled:l,readOnly:a,clearable:c,classNames:f,styles:d,onOpen:p,onClear:u,renderInput:v}){const m=e==="single"?t!=null:n.start!=null,b=M=>M?M.locale(o??"en").format(r):"",g=b(t),E=b(n.start),S=b(n.end),L=Array.isArray(i)?i[0]:i,R=Array.isArray(i)?i[1]:i;if(v){const M=e==="single"?g:[E,S].filter(Boolean).join(" → ");return y.jsx(y.Fragment,{children:v({value:M,onClick:p,onClear:u,isOpen:s,placeholder:L,isDisabled:l,readOnly:a})})}const P=d.inputWrapper??{};function N(M){(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),p())}return y.jsxs("div",{className:U("fldp-input-wrapper",s&&"fldp-input-wrapper--open",l&&"fldp-input-wrapper--disabled",f.inputWrapper),style:P,onClick:p,role:"button","aria-haspopup":"dialog","aria-expanded":s,"aria-disabled":l,tabIndex:l?-1:0,onKeyDown:N,children:[y.jsx(gs,{}),y.jsx("span",{className:"fldp-input-content","aria-hidden":"true",children:e==="single"?y.jsx("span",{className:U("fldp-input-value",!g&&"fldp-input-value--placeholder",f.input),style:d.input,children:g||L}):y.jsxs(y.Fragment,{children:[y.jsx("span",{className:U("fldp-input-value",!E&&"fldp-input-value--placeholder",f.input),style:d.input,children:E||L}),y.jsx("span",{className:U("fldp-separator",f.separator),style:d.separator,children:"→"}),y.jsx("span",{className:U("fldp-input-value",!S&&"fldp-input-value--placeholder",f.input),style:d.input,children:S||R})]})}),c&&m&&!a&&y.jsx("span",{className:U("fldp-clear-button",f.clearButton),style:d.clearButton,role:"button",tabIndex:0,"aria-label":"Clear date",onClick:M=>{M.stopPropagation(),u()},onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),M.stopPropagation(),u())},children:y.jsx(ys,{})})]})}function ws(e){if(!e)return{};const t={"--fldp-primary":e.primary,"--fldp-primary-hover":e.primaryHover,"--fldp-primary-foreground":e.primaryForeground,"--fldp-background":e.background,"--fldp-surface":e.surface,"--fldp-surface-strong":e.surfaceStrong,"--fldp-foreground":e.foreground,"--fldp-muted":e.muted,"--fldp-accent-soft":e.accentSoft,"--fldp-muted-foreground":e.mutedForeground,"--fldp-border":e.border,"--fldp-input-background":e.inputBackground,"--fldp-border-radius":e.borderRadius,"--fldp-day-border-radius":e.dayBorderRadius,"--fldp-shadow":e.shadow,"--fldp-font-family":e.fontFamily,"--fldp-font-size":e.fontSize,"--fldp-today-color":e.todayColor,"--fldp-disabled-opacity":e.disabledOpacity,"--fldp-transition-duration":e.transitionDuration,"--fldp-z-index":e.zIndex,"--fldp-gold":e.primary,"--fldp-gold-light":e.primaryHover??e.primary},n={};for(const[r,o]of Object.entries(t))o!==void 0&&(n[r]=o);return n}function Ht({timeSlots:e,selectedTime:t,onSelectTime:n,timeFormat:r,locale:o,targetDate:i,disabledTime:s,isDisabled:l,readOnly:a,classNames:c={},styles:f={}}){return y.jsxs("div",{className:U("fldp-time-picker",c.timePicker),style:f.timePicker,children:[y.jsx("div",{className:U("fldp-time-title",c.timeTitle),style:f.timeTitle,children:"Time"}),y.jsxs("div",{className:U("fldp-time-slot-list",c.timeSlotList),style:f.timeSlotList,children:[e.length===0&&y.jsx("span",{className:"fldp-time-empty",children:"No availability"}),e.map(d=>{const p=d===t,u=yt(i,d,s),v=Q(`2000-01-01T${d}`).locale(o??"en").format(r);return y.jsx("span",{role:"button",tabIndex:u||l||a?-1:0,"aria-disabled":u||l||a,className:U("fldp-time-slot",p&&"fldp-time-slot--selected",u&&"fldp-time-slot--disabled",c.timeSlot,p&&c.timeSlotSelected,u&&c.timeSlotDisabled),style:{...f.timeSlot,...p&&f.timeSlotSelected,...u&&f.timeSlotDisabled},onClick:()=>{!u&&!l&&!a&&n(d)},onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&!u&&!l&&!a&&(m.preventDefault(),n(d))},children:v},d)})]})]})}Q.extend(ar),Q.extend(fr);const xs="MMM D, YYYY",Es="Select date",Ss=["Start date","End date"],Ms=15,Ls="HH:mm",Ts="00:00",Ds="23:59";function Rs({mode:e="single",value:t,defaultValue:n,rangeValue:r,defaultRangeValue:o,format:i=xs,locale:s,lang:l,weekStartsOn:a=0,enableTime:c=!1,timeStep:f=Ms,timeFormat:d=Ls,minTime:p=Ts,maxTime:u=Ds,disabledTime:v,timeSchedule:m,defaultTimeSchedule:b,minDate:g,maxDate:E,placeholder:S,disabled:L,isDisabled:R=!1,readOnly:P=!1,clearable:N=!0,highlightToday:M=!0,showAdjacentMonthDays:I=!1,showOutsideDays:C,tooltip:V,tooltipDelay:_=300,theme:T,classNames:x={},styles:O={},className:F,style:D,numberOfMonths:w=1,showMonthYearSelectors:A=!0,inline:k=!1,placement:W="auto",renderDay:B,renderNavButton:q,renderInput:Ve,onDateChange:j,onRangeChange:X,onTimeChange:ee,onMonthChange:Kt,onYearChange:Ae,onDayHover:Ut,onOpen:Me,onClose:Le,onClear:Ne,onBeforeSelect:Oe,onAfterSelect:pt}){const We=t!==void 0,[Cs,jt]=$.useState(n??null),pe=We?t??null:Cs,be=r!==void 0,[tr,He]=$.useState(o??{start:null,end:null}),G=$.useMemo(()=>be?r??{start:null,end:null}:tr,[be,r,tr]),[Is,Fs]=$.useState(null),[le,nr]=$.useState(!1),Ke=$.useRef(null),[Ys,rr]=$.useState("bottom"),Ce=$.useCallback(()=>{if(k||W!=="auto"){rr(W==="top"?"top":"bottom");return}if(!Ke.current)return;const Y=Ke.current.getBoundingClientRect(),H=window.innerHeight-Y.bottom,J=Y.top;rr(H>=J?"bottom":"top")},[k,W]);$.useEffect(()=>{if(!le)return;const Y=window.requestAnimationFrame(Ce);return window.addEventListener("resize",Ce),window.addEventListener("scroll",Ce,!0),()=>{window.cancelAnimationFrame(Y),window.removeEventListener("resize",Ce),window.removeEventListener("scroll",Ce,!0)}},[le,Ce]);const or=e==="single"?pe??Q():G.start??Q(),[Xt,_s]=$.useState(or.month()),[zt,Bs]=$.useState(or.year()),sr=$.useCallback(()=>{k||R||P||(nr(!0),Me==null||Me())},[k,R,P,Me]),me=$.useCallback(()=>{k||(nr(!1),Le==null||Le())},[k,Le]),$s=$.useCallback(()=>{k||(le?me():sr())},[k,le,me,sr]),ir=$.useCallback((Y,H)=>({mode:e,phase:Y,currentValue:pe,currentRange:G,nextValue:H}),[e,pe,G]);$.useEffect(()=>{if(k)return;function Y(H){Ke.current&&!Ke.current.contains(H.target)&&me()}return le&&document.addEventListener("mousedown",Y),()=>document.removeEventListener("mousedown",Y)},[le,k,me]),$.useEffect(()=>{if(k)return;function Y(H){H.key==="Escape"&&me()}return le&&document.addEventListener("keydown",Y),()=>document.removeEventListener("keydown",Y)},[le,k,me]);function qt(Y,H){const[J,Xe]=H.split(":").map(Number),te=Number.isFinite(J)?J:0,Zt=Number.isFinite(Xe)?Xe:0;return Y.hour(te).minute(Zt).second(0).millisecond(0)}const Vs=$.useCallback(Y=>{let H,J;if(e==="single")J="single",H=c&&pe?Y.hour(pe.hour()).minute(pe.minute()):Y;else if(!G.start||G.start&&G.end)J="range-start",H={start:c&&G.start?Y.hour(G.start.hour()).minute(G.start.minute()):Y,end:null};else{J="range-end";const te=Y,[Zt,Js]=te.isBefore(G.start)?[te,G.start]:[G.start,te];H={start:Zt,end:Js}}const Xe=ir(J,H);if((Oe==null?void 0:Oe(Y,Xe))!==!1){if(e==="single"){const te=H;We||jt(te),j==null||j(te)}else if(J==="range-start"){const te=H;be||He(te),X==null||X(te)}else{const te=H;be||He(te),X==null||X(te)}pt==null||pt(Y,Xe),!c&&(e==="single"||J==="range-end")&&me()}},[e,G,pe,We,be,Oe,pt,j,X,c,ir,me]);function Ws(){if(e==="single")We||jt(null),j==null||j(null);else{const Y={start:null,end:null};be||He(Y),X==null||X(Y)}Ne==null||Ne()}const Ue=x,je=O,Hs=ws(T),Ks=C??I,Gt=l??s,Z=L&&typeof L=="object"?L:void 0,Us=L===!0?!0:{...Z,before:g?Z!=null&&Z.before&&Z.before.isAfter(g,"day")?Z.before:g:Z==null?void 0:Z.before,after:E?Z!=null&&Z.after&&Z.after.isBefore(E,"day")?Z.after:E:Z==null?void 0:Z.after},js={mode:e,singleValue:pe,rangeValue:G,hoveredDate:Is,currentYear:zt,currentMonth:Xt,setCurrentYear:Y=>{Bs(Y),Ae==null||Ae(Y)},setCurrentMonth:Y=>{_s(Y)},selectDate:Vs,setHoveredDate:Fs,weekStartsOn:a,locale:Gt,showMonthYearSelectors:A,disabled:Us,isDisabled:R,readOnly:P,highlightToday:M,showAdjacentMonthDays:Ks,tooltip:V,tooltipDelay:_,format:i,classNames:Ue,styles:je,renderDay:B,renderNavButton:q,onDateChange:j,onRangeChange:X,onTimeChange:ee,onMonthChange:Kt,onYearChange:Ae,onDayHover:Ut,onOpen:Me,onClose:Le,onClear:Ne},Xs=S??(e==="single"?Es:Ss),mt=e==="single"?pe??Q(new Date(zt,Xt,1)):G.end??G.start??Q(new Date(zt,Xt,1)),zs=(()=>{const Y=mt.format("YYYY-MM-DD"),H=(m==null?void 0:m[Y])??b;return H?un(H):Ge(f,p,u)})(),qs=mt.format("HH:mm");function Gs(Y){if(!(R||P)){if(e==="single"){const H=qt(mt,Y);We||jt(H),j==null||j(H),ee==null||ee(H,Y),k||me();return}if(G.end){const H=qt(G.end,Y),J={...G,end:H};be||He(J),X==null||X(J),ee==null||ee(H,Y),k||me();return}if(G.start){const H=qt(G.start,Y),J={...G,start:H};be||He(J),X==null||X(J),ee==null||ee(H,Y)}}}const Zs={...Hs,...D};return y.jsx(vt.Provider,{value:js,children:y.jsxs("div",{ref:Ke,className:U("fldp-root",F,Ue.root),style:{...Zs,...je.root},"data-mode":e,"data-open":le,"data-inline":k,children:[!k&&y.jsx(bs,{mode:e,singleValue:pe,rangeValue:G,format:i,locale:Gt,placeholder:Xs,isOpen:le,isDisabled:R,readOnly:P,clearable:N,classNames:Ue,styles:je,onOpen:$s,onClear:Ws,renderInput:Ve}),(k||le)&&y.jsxs("div",{role:"dialog","aria-label":"Date picker","aria-modal":"false",className:U("fldp-popover",k&&"fldp-popover--inline",!k&&`fldp-popover--${Ys}`,Ue.popover),style:je.popover,children:[Array.from({length:w},(Y,H)=>y.jsx(er,{panelIndex:H,totalPanels:w},H)),c&&y.jsx(Ht,{timeSlots:zs,selectedTime:qs,onSelectTime:Gs,timeFormat:d,locale:Gt,targetDate:mt,disabledTime:v,isDisabled:R,readOnly:P,classNames:Ue,styles:je})]})]})})}const Ps=[{label:"Dates Sélectionnées",className:"fldp-legend-box--selected"},{label:"Disponibilité",className:"fldp-legend-box--available"},{label:"Pas De Disponibilité",className:"fldp-legend-box--unavailable"},{label:"Séjour Minimal",className:"fldp-legend-box--minimal-stay"},{label:"Pas D'Arrivée",className:"fldp-legend-box--no-arrival"}];function ks({items:e=Ps,className:t,style:n}){return y.jsx("div",{className:`fldp-calendar-legend ${t||""}`,style:n,children:e.map((r,o)=>y.jsxs("div",{className:"fldp-legend-item",children:[y.jsx("div",{className:`fldp-legend-box ${r.className}`}),y.jsx("span",{className:"fldp-legend-label",children:r.label})]},o))})}const As="HH:mm",Ns="Select time";function Os({value:e,defaultValue:t,onChange:n,timeStep:r=15,minTime:o="00:00",maxTime:i="23:59",schedule:s,timeFormat:l=As,placeholder:a=Ns,locale:c,date:f,disabledTime:d,inline:p=!1,isDisabled:u=!1,readOnly:v=!1,clearable:m=!0,onOpen:b,onClose:g,onClear:E,className:S,style:L}){const R=e!==void 0,[P,N]=$.useState(t??""),M=R?e:P,[I,C]=$.useState(!1),V=$.useRef(null),_=$.useCallback(()=>{p||u||v||(C(!0),b==null||b())},[p,u,v,b]),T=$.useCallback(()=>{C(!1),g==null||g()},[g]),x=$.useCallback(()=>{I?T():_()},[I,T,_]),O=f??Q(),F=s?un(s):Ge(r,o,i);$.useEffect(()=>{if(p)return;function W(B){V.current&&!V.current.contains(B.target)&&T()}return I&&document.addEventListener("mousedown",W),()=>document.removeEventListener("mousedown",W)},[I,p,T]),$.useEffect(()=>{if(p)return;function W(B){B.key==="Escape"&&T()}return I&&document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[I,p,T]);function D(W){R||N(W),n==null||n(W),p||T()}function w(W){W.stopPropagation(),R||N(""),n==null||n(""),E==null||E()}const A=M&&!yt(O,M,d)?Q(`2000-01-01T${M}`).locale(c??"en").format(l):M?Q(`2000-01-01T${M}`).locale(c??"en").format(l):"",k=y.jsx(Ht,{timeSlots:F,selectedTime:M,onSelectTime:D,timeFormat:l,locale:c,targetDate:O,disabledTime:d,isDisabled:u,readOnly:v});return p?y.jsx("div",{ref:V,className:U("fldp-root fldp-root--time-only",S),style:L,"data-inline":"true",children:y.jsx("div",{role:"region","aria-label":"Time picker",className:"fldp-popover fldp-popover--inline fldp-popover--time-only",children:k})}):y.jsxs("div",{ref:V,className:U("fldp-root fldp-root--time-only",S),style:L,"data-open":I,children:[y.jsxs("div",{role:"button",tabIndex:u?-1:0,"aria-label":A||a,"aria-haspopup":"dialog","aria-expanded":I,className:U("fldp-input-wrapper",u&&"fldp-input-wrapper--disabled",v&&"fldp-input-wrapper--readonly",I&&"fldp-input-wrapper--open"),onClick:x,onKeyDown:W=>{(W.key==="Enter"||W.key===" ")&&(W.preventDefault(),x())},children:[y.jsxs("svg",{className:"fldp-clock-icon","aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[y.jsx("circle",{cx:"12",cy:"12",r:"10"}),y.jsx("polyline",{points:"12 6 12 12 16 14"})]}),y.jsx("span",{className:U("fldp-input-value",!A&&"fldp-input-value--placeholder"),children:A||a}),m&&M&&!u&&!v&&y.jsx("button",{type:"button","aria-label":"Clear time",className:"fldp-clear-button",tabIndex:-1,onClick:w,children:"×"}),y.jsx("svg",{className:U("fldp-input-chevron",I&&"fldp-input-chevron--open"),"aria-hidden":"true",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:y.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),I&&y.jsx("div",{role:"dialog","aria-label":"Time picker","aria-modal":"false",className:"fldp-popover fldp-popover--time-only",children:k})]})}K.Calendar=er,K.CalendarDay=Qn,K.CalendarHeader=fn,K.CalendarLegend=ks,K.DatePicker=Rs,K.DatePickerContext=vt,K.TimePicker=Os,K.TimeSlotList=Ht,K.Tooltip=Jn,K.generateCalendarDays=sn,K.generateTimeSlots=Ge,K.getMonthNames=cn,K.getWeekdayLabels=ln,K.isBetween=qe,K.isDateDisabled=on,K.isInRange=dr,K.isRangeEnd=gt,K.isRangeStart=ht,K.isSameDay=ce,K.isTimeDisabled=yt,K.useDatePickerContext=ze,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"})});
5
+ //# sourceMappingURL=flexy-date-picker.umd.cjs.map