vendor: 4,595 bytes, line 1
1"use strict";(self.webpackChunksite=self.webpackChunksite||[]).push([[260],{90632:function(e,n,t){var r;t.r(n),t.d(n,{Composite:function(){return L},CompositeItem:function(){return j},FloatingArrow:function(){return N},FloatingDelayGroup:function(){return ne},FloatingFocusManager:function(){return Se},FloatingList:function(){return g},FloatingNode:function(){return q},FloatingOverlay:function(){return Ne},FloatingPortal:function(){return Ie},FloatingTree:function(){return B},NextFloatingDelayGroup:function(){return oe},arrow:function(){return a.x7},autoPlacement:function(){return a.X5},autoUpdate:function(){return f.Me},computePosition:function(){return f.oo},detectOverflow:function(){return f.US},flip:function(){return a.RR},getOverflowAncestors:function(){return c.Kx},hide:function(){return a.Cp},inline:function(){return a.Qo},inner:function(){return pn},limitShift:function(){return a.dr},offset:function(){return a.cv},platform:function(){return f.Jv},safePolygon:function(){return Rn},shift:function(){return a.uY},size:function(){return a.dp},useClick:function(){return Ke},useClientPoint:function(){return _e},useDelayGroup:function(){return te},useDelayGroupContext:function(){return ee},useDismiss:function(){return ze},useFloating:function(){return Ye},useFloatingNodeId:function(){return U},useFloatingParentNodeId:function(){return H},useFloatingPortalNode:function(){return Ee},useFloatingRootContext:function(){return Ve},useFloatingTree:function(){return _},useFocus:function(){return Ze},useHover:function(){return $},useId:function(){return F},useInnerOffset:function(){return gn},useInteractions:function(){return Je},useListItem:function(){return h},useListNavigation:function(){return un},useMergeRefs:function(){return v},useNextDelayGroup:function(){return ue},useRole:function(){return ln},useTransitionStatus:function(){return fn},useTransitionStyles:function(){return dn},useTypeahead:function(){return vn}});t(44062),t(83315);var o=t(27378),u=t(16041),i=t(24246),c=t(95306),l=t(99057),s=t(31542),a=t(84478),f=t(12283),d=t(24283);function v(e){const n=o.useRef(void 0),t=o.useCallback((n=>{const t=e.map((e=>{if(null!=e){if("function"==typeof e){const t=e,r=t(n);return"function"==typeof r?r:()=>{t(null)}}return e.current=n,()=>{e.current=null}}}));return()=>{t.forEach((e=>null==e?void 0:e()))}}),e);return o.useMemo((()=>e.every((e=>null==e))?null:e=>{n.current&&(n.current(),n.current=void 0),null!=e&&(n.current=t(e))}),e)}function m(e,n){const t=e.compareDocumentPosition(n);return t&Node.DOCUMENT_POSITION_FOLLOWING||t&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:t&Node.DOCUMENT_POSITION_PRECEDING||t&Node.DOCUMENT_POSITION_CONTAINS?1:0}const p=o.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function g(e){const{children:n,elementsRef:t,labelsRef:r}=e,[u,c]=o.useState((()=>new Set)),l=o.useCallback((e=>{c((n=>new Set(n).add(e)))}),[]),s=o.useCallback((e=>{c((n=>{const t=new Set(n);return t.delete(e),t}))}),[]),a=o.useMemo((()=>{const e=new Map;return Array.from(u.keys()).sort(m).forEach(((n,t)=>{e.set(n,t)})),e}),[u]);return(0,i.jsx)(p.Provider,{value:o.useMemo((()=>({register:l,unregister:s,map:a,elementsRef:t,labelsRef:r})),[l,s,a,t,r]),children:n})}function h(e){void 0===e&&(e={});const{label:n}=e,{register:t,unregister:r,map:i,elementsRef:c,labelsRef:l}=o.useContext(p),[s,a]=o.useState(null),f=o.useRef(null),d=o.useCallback((e=>{if(f.current=e,null!==s&&(c.current[s]=e,l)){var t;const r=void 0!==n;l.current[s]=r?n:null!=(t=null==e?void 0:e.textContent)?t:null}}),[s,c,l,n]);return(0,u.Xj)((()=>{const e=f.current;if(e)return t(e),()=>{r(e)}}),[t,r]),(0,u.Xj)((()=>{const e=f.current?i.get(f.current):null;null!=e&&a(e)}),[i]),o.useMemo((()=>({ref:d,index:null==s?-1:s})),[s,d])}const y="data-floating-ui-focusable",R="active",b="selected",x="ArrowLeft",w="ArrowRight",E="ArrowUp",I="ArrowDown";function k(e,n){return"function"==typeof e?e(n):e?o.cloneElement(e,n):(0,i.jsx)("div",{...n})}const M=o.createContext({activeIndex:0,onNavigate:()=>{}}),C=[x,w],P=[E,I],T=[...C,...P],L=o.forwardRef((function(e,n){const{render:t,orientation:r="both",loop:c=!0,rtl:l=!1,cols:s=1,disabledIndices:a,activeIndex:f,onNavigate:d,itemSizes:v,dense:m=!1,...p}=e,[h,y]=o.useState(0),R=null!=f?f:h,b=(0,u.iW)(null!=d?d:y),L=o.useRef([]),j=t&&"function"!=typeof t?t.props:{},O=o.useMemo((()=>({activeIndex:R,onNavigate:b})),[R,b]),S=s>1;const A={...p,...j,ref:n,"aria-orientation":"both"===r?void 0:r,onKeyDown(e){null==p.onKeyDown||p.onKeyDown(e),null==j.onKeyDown||j.onKeyDown(e),function(e){if(!T.includes(e.ke
1y))return;let n=R;const t=(0,u.h$)(L,a),o=(0,u.zc)(L,a),i=l?x:w,f=l?w:x;if(S){const f=v||Array.from({length:L.current.length},(()=>({width:1,height:1}))),d=(0,u.fe)(f,s,m),p=d.findIndex((e=>null!=e&&!(0,u.Nm)(L,e,a))),g=d.reduce(((e,n,t)=>null==n||(0,u.Nm)(L,n,a)?e:t),-1),h=d[(0,u.xR)({current:d.map((e=>e?L.current[e]:null))},{event:e,orientation:r,loop:c,rtl:l,cols:s,disabledIndices:(0,u.w_)([...("function"!=typeof a?a:null)||L.current.map(((e,n)=>(0,u.Nm)(L,n,a)?n:void 0)),void 0],d),minIndex:p,maxIndex:g,prevIndex:(0,u.XH)(R>o?t:R,f,d,s,e.key===I?"bl":e.key===i?"tr":"tl")})];null!=h&&(n=h)}const d={horizontal:[i],vertical:[I],both:[i,I]}[r],p={horizontal:[f],vertical:[E],both:[f,E]}[r],g=S?T:{horizontal:C,vertical:P,both:T}[r];var h;n===R&&[...d,...p].includes(e.key)&&(n=c&&n===o&&d.includes(e.key)?t:c&&n===t&&p.includes(e.key)?o:(0,u.aF)(L,{startingIndex:n,decrement:p.includes(e.key),disabledIndices:a})),n===R||(0,u.VP)(L,n)||(e.stopPropagation(),g.includes(e.key)&&e.preventDefault(),b(n),null==(h=L.current[n])||h.focus())}(e)}};return(0,i.jsx)(M.Provider,{value:O,children:(0,i.jsx)(g,{elementsRef:L,children:k(t,A)})})})),j=o.forwardRef((function(e,n){const{render:t,...r}=e,u=t&&"function"!=typeof t?t.props:{},{activeIndex:i,onNavigate:c}=o.useContext(M),{ref:l,index:s}=h(),a=v([l,n,u.ref]),f=i===s;return k(t,{...r,...u,ref:a,tabIndex:f?0:-1,"data-active":f?"":void 0,onFocus(e){null==r.onFocus||r.onFocus(e),null==u.onFocus||u.onFocus(e),c(s)}})})),O={...r||(r=t.t(o,2))};let S=!1,A=0;const W=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+A++;const F=O.useId||function(){const[e,n]=o.useState((()=>S?W():void 0));return(0,u.Xj)((()=>{null==e&&n(W())}),[]),o.useEffect((()=>{S=!0}),[]),e};const N=o.forwardRef((function(e,n){const{context:{placement:t,elements:{floating:r},middlewareData:{arrow:l,shift:s}},width:a=14,height:f=7,tipRadius:d=0,strokeWidth:v=0,staticOffset:m,stroke:p,d:g,style:{transform:h,...y}={},...R}=e;const b=F(),[x,w]=o.useState(!1);if((0,u.Xj)((()=>{if(!r)return;"rtl"===(0,c.Dx)(r).direction&&w(!0)}),[r]),!r)return null;const[E,I]=t.split("-"),k="top"===E||"bottom"===E;let M=m;(k&&null!=s&&s.x||!k&&null!=s&&s.y)&&(M=null);const C=2*v,P=C/2,T=a/2*(d/-8+1),L=f/2*d/4,j=!!g,O=M&&"end"===I?"bottom":"top";let S=M&&"end"===I?"right":"left";M&&x&&(S="end"===I?"left":"right");const A=null!=(null==l?void 0:l.x)?M||l.x:"",W=null!=(null==l?void 0:l.y)?M||l.y:"",N=g||"M0,0 H"+a+" L"+(a-T)+","+(f-L)+" Q"+a/2+","+f+" "+T+","+(f-L)+" Z",D={top:j?"rotate(180deg)":"",left:j?"rotate(90deg)":"rotate(-90deg)",bottom:j?"":"rotate(180deg)",right:j?"rotate(-90deg)":"rotate(90deg)"}[E];return(0,i.jsxs)("svg",{...R,"aria-hidden":!0,ref:n,width:j?a:a+C,height:a,viewBox:"0 0 "+a+" "+(f>a?f:a),style:{position:"absolute",pointerEvents:"none",[S]:A,[O]:W,[E]:k||j?"100%":"calc(100% - "+C/2+"px)",transform:[D,h].filter((e=>!!e)).join(" "),...y},children:[C>0&&(0,i.jsx)("path",{clipPath:"url(#"+b+")",fill:"none",stroke:p,strokeWidth:C+(g?0:1),d:N}),(0,i.jsx)("path",{stroke:C&&!g?R.fill:"none",d:N}),(0,i.jsx)("clipPath",{id:b,children:(0,i.jsx)("rect",{x:-P,y:P*(j?-1:1),width:a+C,height:a})})]})}));function D(){const e=new Map;return{emit(n,t){var r;null==(r=e.get(n))||r.forEach((e=>e(t)))},on(n,t){e.has(n)||e.set(n,new Set),e.get(n).add(t)},off(n,t){var r;null==(r=e.get(n))||r.delete(t)}}}const X=o.createContext(null),K=o.createContext(null),H=()=>{var e;return(null==(e=o.useContext(X))?void 0:e.id)||null},_=()=>o.useContext(K);function U(e){const n=F(),t=_(),r=H(),o=e||r;return(0,u.Xj)((()=>{if(!n)return;const e={id:n,parentId:o};return null==t||t.addNode(e),()=>{null==t||t.removeNode(e)}}),[t,n,o]),n}function q(e){const{children:n,id:t}=e,r=H();return(0,i.jsx)(X.Provider,{value:o.useMemo((()=>({id:t,parentId:r})),[t,r]),children:n})}function B(e){const{children:n}=e,t=o.useRef([]),r=o.useCallback((e=>{t.current=[...t.current,e]}),[]),u=o.useCallback((e=>{t.current=t.current.filter((n=>n!==e))}),[]),[c]=o.useState((()=>D()));return(0,i.jsx)(K.Provider,{value:o.useMemo((()=>({nodesRef:t,addNode:r,removeNode:u,events:c})),[r,u,c]),children:n})}function z(e){return"data-floating-ui-"+e}function V(e){-1!==e.current&&(clearTimeout(e.current),e.current=-1)}const Y=z("safe-polygon");function G(e,n,t){if(t&&!(0,u.r)(t))return 0;if("number"==typeof e)return e;if("function"==typeof e){const t=e();return"number"==typeof t?t:null==t?void 0:t[n]}return null==e?void 0:e[n]}function Z(e){return"function"==typeof e?e():e}function $(e,n){void 0===n&&(n={});const{open:t,onOpenChange:r,dataRef:i,events:l,elements:s}=e,{enabled:a=!0,delay:f=0,handleClose:d=null,mouseOnly:v=!1,restMs:m=0,move:p=!0}=n,g=_(),h=H(),y=(0,u.II)(d),R=(0,u.II)(f),b=(0,u.II)(t),x=(0,u.II)(m),w=o.useRef(),E=o.useRef(-1),I=o.useRef(),k=o.useRef(-1),M=o.useRef(!0),C=o.useRef(!1),P=o.useRef((()=>{})),T=o.useRef(!1),L=(0,u.iW)((()=>{var e;const n=null==(e=i.current.openEvent)?void 0:e.type;return(null==n?void 0:n.includes("mouse"))&&"mousedown"!==n}));o.useEffect((()=>
1{if(a)return l.on("openchange",e),()=>{l.off("openchange",e)};function e(e){let{open:n}=e;n||(V(E),V(k),M.current=!0,T.current=!1)}}),[a,l]),o.useEffect((()=>{if(!a)return;if(!y.current)return;if(!t)return;function e(e){L()&&r(!1,e,"hover")}const n=(0,u.Me)(s.floating).documentElement;return n.addEventListener("mouseleave",e),()=>{n.removeEventListener("mouseleave",e)}}),[s.floating,t,r,a,y,L]);const j=o.useCallback((function(e,n,t){void 0===n&&(n=!0),void 0===t&&(t="hover");const o=G(R.current,"close",w.current);o&&!I.current?(V(E),E.current=window.setTimeout((()=>r(!1,e,t)),o)):n&&(V(E),r(!1,e,t))}),[R,r]),O=(0,u.iW)((()=>{P.current(),I.current=void 0})),S=(0,u.iW)((()=>{if(C.current){const e=(0,u.Me)(s.floating).body;e.style.pointerEvents="",e.removeAttribute(Y),C.current=!1}})),A=(0,u.iW)((()=>!!i.current.openEvent&&["click","mousedown"].includes(i.current.openEvent.type)));o.useEffect((()=>{if(a&&(0,c.kK)(s.domReference)){const r=s.domReference,u=s.floating;return t&&r.addEventListener("mouseleave",o),p&&r.addEventListener("mousemove",e,{once:!0}),r.addEventListener("mouseenter",e),r.addEventListener("mouseleave",n),u&&(u.addEventListener("mouseleave",o),u.addEventListener("mouseenter",l),u.addEventListener("mouseleave",f)),()=>{t&&r.removeEventListener("mouseleave",o),p&&r.removeEventListener("mousemove",e),r.removeEventListener("mouseenter",e),r.removeEventListener("mouseleave",n),u&&(u.removeEventListener("mouseleave",o),u.removeEventListener("mouseenter",l),u.removeEventListener("mouseleave",f))}}function e(e){if(V(E),M.current=!1,v&&!(0,u.r)(w.current)||Z(x.current)>0&&!G(R.current,"open"))return;const n=G(R.current,"open",w.current);n?E.current=window.setTimeout((()=>{b.current||r(!0,e,"hover")}),n):t||r(!0,e,"hover")}function n(e){if(A())return void S();P.current();const n=(0,u.Me)(s.floating);if(V(k),T.current=!1,y.current&&i.current.floatingContext){t||V(E),I.current=y.current({...i.current.floatingContext,tree:g,x:e.clientX,y:e.clientY,onClose(){S(),O(),A()||j(e,!0,"safe-polygon")}});const r=I.current;return n.addEventListener("mousemove",r),void(P.current=()=>{n.removeEventListener("mousemove",r)})}("touch"!==w.current||!(0,u.r3)(s.floating,e.relatedTarget))&&j(e)}function o(e){A()||i.current.floatingContext&&(null==y.current||y.current({...i.current.floatingContext,tree:g,x:e.clientX,y:e.clientY,onClose(){S(),O(),A()||j(e)}})(e))}function l(){V(E)}function f(e){A()||j(e,!1)}}),[s,a,e,v,p,j,O,S,r,t,b,g,R,y,i,A,x]),(0,u.Xj)((()=>{var e;if(a&&t&&null!=(e=y.current)&&null!=(e=e.__options)&&e.blockPointerEvents&&L()){C.current=!0;const e=s.floating;if((0,c.kK)(s.domReference)&&e){var n;const t=(0,u.Me)(s.floating).body;t.setAttribute(Y,"");const r=s.domReference,o=null==g||null==(n=g.nodesRef.current.find((e=>e.id===h)))||null==(n=n.context)?void 0:n.elements.floating;return o&&(o.style.pointerEvents=""),t.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{t.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}}),[a,t,h,s,g,y,L]),(0,u.Xj)((()=>{t||(w.current=void 0,T.current=!1,O(),S())}),[t,O,S]),o.useEffect((()=>()=>{O(),V(E),V(k),S()}),[a,s.domReference,O,S]);const W=o.useMemo((()=>{function e(e){w.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:n}=e;function o(){M.current||b.current||r(!0,n,"hover")}v&&!(0,u.r)(w.current)||t||0===Z(x.current)||T.current&&e.movementX**2+e.movementY**2<2||(V(k),"touch"===w.current?o():(T.current=!0,k.current=window.setTimeout(o,Z(x.current))))}}}),[v,r,t,b,x]);return o.useMemo((()=>a?{reference:W}:{}),[a,W])}const J=()=>{},Q=o.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:J,setState:J,isInstantPhase:!1}),ee=()=>o.useContext(Q);function ne(e){const{children:n,delay:t,timeoutMs:r=0}=e,[c,l]=o.useReducer(((e,n)=>({...e,...n})),{delay:t,timeoutMs:r,initialDelay:t,currentId:null,isInstantPhase:!1}),s=o.useRef(null),a=o.useCallback((e=>{l({currentId:e})}),[]);return(0,u.Xj)((()=>{c.currentId?null===s.current?s.current=c.currentId:c.isInstantPhase||l({isInstantPhase:!0}):(c.isInstantPhase&&l({isInstantPhase:!1}),s.current=null)}),[c.currentId,c.isInstantPhase]),(0,i.jsx)(Q.Provider,{value:o.useMemo((()=>({...c,setState:l,setCurrentId:a})),[c,a]),children:n})}function te(e,n){void 0===n&&(n={});const{open:t,onOpenChange:r,floatingId:o}=e,{id:i,enabled:c=!0}=n,l=null!=i?i:o,s=ee(),{currentId:a,setCurrentId:f,initialDelay:d,setState:v,timeoutMs:m}=s;return(0,u.Xj)((()=>{c&&a&&(v({delay:{open:1,close:G(d,"close")}}),a!==l&&r(!1))}),[c,l,r,v,a,d]),(0,u.Xj)((()=>{function e(){r(!1),v({delay:d,currentId:null})}if(c&&a&&!t&&a===l){if(m){const n=window.setTimeout(e,m);return()=>{clearTimeout(n)}}e()}}),[c,t,v,a,l,r,d,m]),(0,u.Xj)((()=>{c&&f!==J&&t&&f(l)}),[c,t,f,l]),s}const re=o.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeoutIdRef:{current:-1},currentIdRef:{current:null},currentContextRef:{current:null}});function oe(e){const{children:n,delay:t,timeoutMs:r=0}=e,u=o.useRef(t),c=o.useRef(t),l=o.useRef(null),s=o.useRef(null),a=o.useRef(-1);return(0,i.jsx)(re.Provider,{value:o.useMemo((()=>({hasProvider:!0,delayRef:u,initialDelayRef:c,currentIdRef:l,timeoutMs:r,currentContextRef:s,timeoutIdRef:a})),[r]),children:n})}function ue(e,n){void 0===n&&(n={});const{open:t,onOpenChange:r,floatingId:i}=e,{enabled:c=!0}=n,l=o.useContext(re),{currentIdRef:s,delayRef:a,timeoutMs:f,initialDelayRef:d,currentContextRef:v,hasProvider:m,timeoutIdRef:p}
1=l,[g,h]=o.useState(!1);return(0,u.Xj)((()=>{function e(){var e;h(!1),null==(e=v.current)||e.setIsInstantPhase(!1),s.current=null,v.current=null,a.current=d.current}if(c&&s.current&&!t&&s.current===i){if(h(!1),f)return p.current=window.setTimeout(e,f),()=>{clearTimeout(p.current)};e()}}),[c,t,i,s,a,f,d,v,p]),(0,u.Xj)((()=>{if(!c)return;if(!t)return;const e=v.current,n=s.current;v.current={onOpenChange:r,setIsInstantPhase:h},s.current=i,a.current={open:0,close:G(d.current,"close")},null!==n&&n!==i?(V(p),h(!0),null==e||e.setIsInstantPhase(!0),null==e||e.onOpenChange(!1)):(h(!1),null==e||e.setIsInstantPhase(!1))}),[c,t,i,r,s,a,f,d,v,p]),(0,u.Xj)((()=>()=>{v.current=null}),[v]),o.useMemo((()=>({hasProvider:m,delayRef:a,isInstantPhase:g})),[m,a,g])}let ie=0;function ce(e,n){void 0===n&&(n={});const{preventScroll:t=!1,cancelPrevious:r=!0,sync:o=!1}=n;r&&cancelAnimationFrame(ie);const u=()=>null==e?void 0:e.focus({preventScroll:t});o?u():ie=requestAnimationFrame(u)}function le(e,n){if(!e||!n)return!1;const t=null==n.getRootNode?void 0:n.getRootNode();if(e.contains(n))return!0;if(t&&(0,c.Zq)(t)){let t=n;for(;t;){if(e===t)return!0;t=t.parentNode||t.host}}return!1}const se={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function ae(e){return"inert"===e?se.inert:"aria-hidden"===e?se["aria-hidden"]:se.none}let fe=new WeakSet,de={},ve=0;const me=()=>"undefined"!=typeof HTMLElement&&"inert"in HTMLElement.prototype,pe=e=>e&&(e.host||pe(e.parentNode)),ge=(e,n)=>n.map((n=>{if(e.contains(n))return n;const t=pe(n);return e.contains(t)?t:null})).filter((e=>null!=e));function he(e,n,t){void 0===n&&(n=!1),void 0===t&&(t=!1);const r=(o=e[0],(null==o?void 0:o.ownerDocument)||document).body;var o;return function(e,n,t,r){const o="data-floating-ui-inert",u=r?"inert":t?"aria-hidden":null,i=ge(n,e),l=new Set,s=new Set(i),a=[];de[o]||(de[o]=new WeakMap);const f=de[o];return i.forEach((function e(n){n&&!l.has(n)&&(l.add(n),n.parentNode&&e(n.parentNode))})),function e(n){n&&!s.has(n)&&[].forEach.call(n.children,(n=>{if("script"!==(0,c.wk)(n))if(l.has(n))e(n);else{const e=u?n.getAttribute(u):null,t=null!==e&&"false"!==e,r=ae(u),i=(r.get(n)||0)+1,c=(f.get(n)||0)+1;r.set(n,i),f.set(n,c),a.push(n),1===i&&t&&fe.add(n),1===c&&n.setAttribute(o,""),!t&&u&&n.setAttribute(u,"inert"===u?"":"true")}}))}(n),l.clear(),ve++,()=>{a.forEach((e=>{const n=ae(u),t=(n.get(e)||0)-1,r=(f.get(e)||0)-1;n.set(e,t),f.set(e,r),t||(!fe.has(e)&&u&&e.removeAttribute(u),fe.delete(e)),r||e.removeAttribute(o)})),ve--,ve||(se.inert=new WeakMap,se["aria-hidden"]=new WeakMap,se.none=new WeakMap,fe=new WeakSet,de={})}}(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,n,t)}const ye={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},Re=o.forwardRef((function(e,n){const[t,r]=o.useState();(0,u.Xj)((()=>{(0,u.G6)()&&r("button")}),[]);const c={ref:n,tabIndex:0,role:t,"aria-hidden":!t||void 0,[z("focus-guard")]:"",style:ye};return(0,i.jsx)("span",{...e,...c})})),be={clipPath:"inset(50%)",position:"fixed",top:0,left:0},xe=o.createContext(null),we=z("portal");function Ee(e){void 0===e&&(e={});const{id:n,root:t}=e,r=F(),i=ke(),[l,s]=o.useState(null),a=o.useRef(null);return(0,u.Xj)((()=>()=>{null==l||l.remove(),queueMicrotask((()=>{a.current=null}))}),[l]),(0,u.Xj)((()=>{if(!r)return;if(a.current)return;const e=n?document.getElementById(n):null;if(!e)return;const t=document.createElement("div");t.id=r,t.setAttribute(we,""),e.appendChild(t),a.current=t,s(t)}),[n,r]),(0,u.Xj)((()=>{if(null===t)return;if(!r)return;if(a.current)return;let e=t||(null==i?void 0:i.portalNode);e&&!(0,c.UG)(e)&&(e=e.current),e=e||document.body;let o=null;n&&(o=document.createElement("div"),o.id=n,e.appendChild(o));const u=document.createElement("div");u.id=r,u.setAttribute(we,""),e=o||e,e.appendChild(u),a.current=u,s(u)}),[n,t,r,i]),l}function Ie(e){const{children:n,id:t,root:r,preserveTabOrder:c=!0}=e,l=Ee({id:t,root:r}),[a,f]=o.useState(null),d=o.useRef(null),v=o.useRef(null),m=o.useRef(null),p=o.useRef(null),g=null==a?void 0:a.modal,h=null==a?void 0:a.open,y=!!a&&!a.modal&&a.open&&c&&!(!r&&!l);return o.useEffect((()=>
1{if(l&&c&&!g)return l.addEventListener("focusin",e,!0),l.addEventListener("focusout",e,!0),()=>{l.removeEventListener("focusin",e,!0),l.removeEventListener("focusout",e,!0)};function e(e){if(l&&(0,u.dE)(e)){("focusin"===e.type?u.NX:u.N6)(l)}}}),[l,c,g]),o.useEffect((()=>{l&&(h||(0,u.NX)(l))}),[h,l]),(0,i.jsxs)(xe.Provider,{value:o.useMemo((()=>({preserveTabOrder:c,beforeOutsideRef:d,afterOutsideRef:v,beforeInsideRef:m,afterInsideRef:p,portalNode:l,setFocusManagerState:f})),[c,l]),children:[y&&l&&(0,i.jsx)(Re,{"data-type":"outside",ref:d,onFocus:e=>{if((0,u.dE)(e,l)){var n;null==(n=m.current)||n.focus()}else{const e=a?a.domReference:null,n=(0,u.e8)(e);null==n||n.focus()}}}),y&&l&&(0,i.jsx)("span",{"aria-owns":l.id,style:be}),l&&s.createPortal(n,l),y&&l&&(0,i.jsx)(Re,{"data-type":"outside",ref:v,onFocus:e=>{if((0,u.dE)(e,l)){var n;null==(n=p.current)||n.focus()}else{const n=a?a.domReference:null,t=(0,u.k0)(n);null==t||t.focus(),(null==a?void 0:a.closeOnFocusOut)&&(null==a||a.onOpenChange(!1,e.nativeEvent,"focus-out"))}}})]})}const ke=()=>o.useContext(xe);function Me(e){return o.useMemo((()=>n=>{e.forEach((e=>{e&&(e.current=n)}))}),e)}const Ce=20;let Pe=[];function Te(){Pe=Pe.filter((e=>e.isConnected))}function Le(){return Te(),Pe[Pe.length-1]}function je(e,n){var t;if(!(n.current.includes("floating")||null!=(t=e.getAttribute("role"))&&t.includes("dialog")))return;const r=(0,u.Tv)(),o=(0,l.KW)(e,r).filter((e=>{const n=e.getAttribute("data-tabindex")||"";return(0,l.Wq)(e,r)||e.hasAttribute("data-tabindex")&&!n.startsWith("-")})),i=e.getAttribute("tabindex");n.current.includes("floating")||0===o.length?"0"!==i&&e.setAttribute("tabindex","0"):("-1"!==i||e.hasAttribute("data-tabindex")&&"-1"!==e.getAttribute("data-tabindex"))&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const Oe=o.forwardRef((function(e,n){return(0,i.jsx)("button",{...e,type:"button",ref:n,tabIndex:-1,style:ye})}));function Se(e){const{context:n,children:t,disabled:r=!1,order:s=["content"],guards:a=!0,initialFocus:f=0,returnFocus:d=!0,restoreFocus:v=!1,modal:m=!0,visuallyHiddenDismiss:p=!1,closeOnFocusOut:g=!0,outsideElementsInert:h=!1,getInsideElements:y=(()=>[])}=e,{open:R,onOpenChange:b,events:x,dataRef:w,elements:{domReference:E,floating:I}}=n,k=(0,u.iW)((()=>{var e;return null==(e=w.current.floatingContext)?void 0:e.nodeId})),M=(0,u.iW)(y),C="number"==typeof f&&f<0,P=(0,u.Ie)(E)&&C,T=me(),L=!T||a,j=!L||T&&h,O=(0,u.II)(s),S=(0,u.II)(f),A=(0,u.II)(d),W=_(),F=ke(),N=o.useRef(null),D=o.useRef(null),X=o.useRef(!1),K=o.useRef(!1),H=o.useRef(-1),U=o.useRef(-1),q=null!=F,B=(0,u.zd)(I),Y=(0,u.iW)((function(e){return void 0===e&&(e=B),e?(0,l.ht)(e,(0,u.Tv)()):[]})),G=(0,u.iW)((e=>{const n=Y(e);return O.current.map((e=>E&&"reference"===e?E:B&&"floating"===e?B:n)).filter(Boolean).flat()}));o.useEffect((()=>{if(r)return;if(!m)return;function e(e){if("Tab"===e.key){(0,u.r3)(B,(0,u.AW)((0,u.Me)(B)))&&0===Y().length&&!P&&(0,u.p7)(e);const n=G(),t=(0,u.U9)(e);"reference"===O.current[0]&&t===E&&((0,u.p7)(e),e.shiftKey?ce(n[n.length-1]):ce(n[1])),"floating"===O.current[1]&&t===B&&e.shiftKey&&((0,u.p7)(e),ce(n[0]))}}const n=(0,u.Me)(B);return n.addEventListener("keydown",e),()=>{n.removeEventListener("keydown",e)}}),[r,E,B,m,O,P,Y,G]),o.useEffect((()=>{if(!r&&I)return I.addEventListener("focusin",e),()=>{I.removeEventListener("focusin",e)};function e(e){const n=(0,u.U9)(e),t=Y().indexOf(n);-1!==t&&(H.current=t)}}),[r,I,Y]),o.useEffect((()=>{if(r)return;if(!g)return;function e(){K.current=!0,setTimeout((()=>{K.current=!1}))}function n(e){const n=e.relatedTarget,t=e.currentTarget,r=(0,u.U9)(e);queueMicrotask((()=>{const o=k(),i=!((0,u.r3)(E,n)||(0,u.r3)(I,n)||(0,u.r3)(n,I)||(0,u.r3)(null==F?void 0:F.portalNode,n)||null!=n&&n.hasAttribute(z("focus-guard"))||W&&((0,u.El)(W.nodesRef.current,o).find((e=>{var t,r;return(0,u.r3)(null==(t=e.context)?void 0:t.elements.floating,n)||(0,u.r3)(null==(r=e.context)?void 0:r.elements.domReference,n)}))||(0,u.C1)(W.nodesRef.current,o).find((e=>{var t,r,o;return[null==(t=e.context)?void 0:t.elements.floating,(0,u.zd)(null==(r=e.context)?void 0:r.elements.floating)].includes(n)||(null==(o=e.context)?void 0:o.elements.domReference)===n}))));if(t===E&&B&&je(B,O),v&&t!==E&&(null==r||!r.isConnected)&&(0,u.AW)((0,u.Me)(B))===(0,u.Me)(B).body){(0,c.Re)(B)&&B.focus();const e=H.current,n=Y(),t=n[e]||n[n.length-1]||B;
1(0,c.Re)(t)&&t.focus()}w.current.insideReactTree?w.current.insideReactTree=!1:!P&&m||!n||!i||K.current||n===Le()||(X.current=!0,b(!1,e,"focus-out"))}))}const t=Boolean(!W&&F);function o(){V(U),w.current.insideReactTree=!0,U.current=window.setTimeout((()=>{w.current.insideReactTree=!1}))}return I&&(0,c.Re)(E)?(E.addEventListener("focusout",n),E.addEventListener("pointerdown",e),I.addEventListener("focusout",n),t&&I.addEventListener("focusout",o,!0),()=>{E.removeEventListener("focusout",n),E.removeEventListener("pointerdown",e),I.removeEventListener("focusout",n),t&&I.removeEventListener("focusout",o,!0)}):void 0}),[r,E,I,B,m,W,F,b,g,v,Y,P,k,O,w]);const Z=o.useRef(null),$=o.useRef(null),J=Me([Z,null==F?void 0:F.beforeInsideRef]),Q=Me([$,null==F?void 0:F.afterInsideRef]);function ee(e){return!r&&p&&m?(0,i.jsx)(Oe,{ref:"start"===e?N:D,onClick:e=>b(!1,e.nativeEvent),children:"string"==typeof p?p:"Dismiss"}):null}o.useEffect((()=>{var e,n;if(r)return;if(!I)return;const t=Array.from((null==F||null==(e=F.portalNode)?void 0:e.querySelectorAll("["+z("portal")+"]"))||[]),o=null==(n=(W?(0,u.C1)(W.nodesRef.current,k()):[]).find((e=>{var n;return(0,u.Ie)((null==(n=e.context)?void 0:n.elements.domReference)||null)})))||null==(n=n.context)?void 0:n.elements.domReference,i=[I,o,...t,...M(),N.current,D.current,Z.current,$.current,null==F?void 0:F.beforeOutsideRef.current,null==F?void 0:F.afterOutsideRef.current,O.current.includes("reference")||P?E:null].filter((e=>null!=e)),c=m||P?he(i,!j,j):he(i);return()=>{c()}}),[r,E,I,m,O,F,P,L,j,W,k,M]),(0,u.Xj)((()=>{if(r||!(0,c.Re)(B))return;const e=(0,u.Me)(B),n=(0,u.AW)(e);queueMicrotask((()=>{const e=G(B),t=S.current,r=("number"==typeof t?e[t]:t.current)||B,o=(0,u.r3)(B,n);C||o||!R||ce(r,{preventScroll:r===B})}))}),[r,R,B,C,G,S]),(0,u.Xj)((()=>{if(r||!B)return;const e=(0,u.Me)(B),n=(0,u.AW)(e);var t;function o(e){let{reason:n,event:t,nested:r}=e;if(["hover","safe-polygon"].includes(n)&&"mouseleave"===t.type&&(X.current=!0),"outside-press"===n)if(r)X.current=!1;else if((0,u.Zj)(t)||(0,u.cr)(t))X.current=!1;else{let e=!1;document.createElement("div").focus({get preventScroll(){return e=!0,!1}}),X.current=!e}}t=n,Te(),t&&"body"!==(0,c.wk)(t)&&(Pe.push(t),Pe.length>Ce&&(Pe=Pe.slice(-20))),x.on("openchange",o);const i=e.createElement("span");return i.setAttribute("tabindex","-1"),i.setAttribute("aria-hidden","true"),Object.assign(i.style,ye),q&&E&&E.insertAdjacentElement("afterend",i),()=>{x.off("openchange",o);const n=(0,u.AW)(e),t=(0,u.r3)(I,n)||W&&(0,u.El)(W.nodesRef.current,k(),!1).some((e=>{var t;return(0,u.r3)(null==(t=e.context)?void 0:t.elements.floating,n)})),r=function(){if("boolean"==typeof A.current){const e=E||Le();return e&&e.isConnected?e:i}return A.current.current||i}();queueMicrotask((()=>{const o=function(e){const n=(0,u.Tv)();return(0,l.Wq)(e,n)?e:(0,l.ht)(e,n)[0]||e}(r);A.current&&!X.current&&(0,c.Re)(o)&&(o===n||n===e.body||t)&&o.focus({preventScroll:!0}),i.remove()}))}}),[r,I,B,A,w,x,W,q,E,k]),o.useEffect((()=>(queueMicrotask((()=>{X.current=!1})),()=>{queueMicrotask(Te)})),[r]),(0,u.Xj)((()=>{if(!r&&F)return F.setFocusManagerState({modal:m,closeOnFocusOut:g,open:R,onOpenChange:b,domReference:E}),()=>{F.setFocusManagerState(null)}}),[r,F,m,R,b,g,E]),(0,u.Xj)((()=>{r||B&&je(B,O)}),[r,B,O]);const ne=!r&&L&&(!m||!P)&&(q||m);return(0,i.jsxs)(i.Fragment,{children:[ne&&(0,i.jsx)(Re,{"data-type":"inside",ref:J,onFocus:e=>{if(m){const e=G();ce("reference"===s[0]?e[0]:e[e.length-1])}else if(null!=F&&F.preserveTabOrder&&F.portalNode)if(X.current=!1,(0,u.dE)(e,F.portalNode)){const e=(0,u.k0)(E);null==e||e.focus()}else{var n;null==(n=F.beforeOutsideRef.current)||n.focus()}}}),!P&&ee("start"),t,ee("end"),ne&&(0,i.jsx)(Re,{"data-type":"inside",ref:Q,onFocus:e=>{if(m)ce(G()[0]);else if(null!=F&&F.preserveTabOrder&&F.portalNode)if(g&&(X.current=!0),(0,u.dE)(e,F.portalNode)){const e=(0,u.e8)(E);null==e||e.focus()}else{var n;null==(n=F.afterOutsideRef.current)||n.focus()}}})]})}let Ae=0;const We="--floating-ui-scrollbar-width";let Fe=()=>{};const Ne=o.forwardRef((function(e,n){const{lockScroll:t=!1,...r}=e;return(0,u.Xj)((()=>
1{if(t)return Ae++,1===Ae&&(Fe=function(){const e=(0,u.Xf)(),n=/iP(hone|ad|od)|iOS/.test(e)||"MacIntel"===e&&navigator.maxTouchPoints>1,t=document.body.style,r=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth,i=t.left?parseFloat(t.left):window.scrollX,c=t.top?parseFloat(t.top):window.scrollY;if(t.overflow="hidden",t.setProperty(We,o+"px"),o&&(t[r]=o+"px"),n){var l,s;const e=(null==(l=window.visualViewport)?void 0:l.offsetLeft)||0,n=(null==(s=window.visualViewport)?void 0:s.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(c-Math.floor(n))+"px",left:-(i-Math.floor(e))+"px",right:"0"})}return()=>{Object.assign(t,{overflow:"",[r]:""}),t.removeProperty(We),n&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(i,c))}}()),()=>{Ae--,0===Ae&&Fe()}}),[t]),(0,i.jsx)("div",{ref:n,...r,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...r.style}})}));function De(e){return(0,c.Re)(e.target)&&"BUTTON"===e.target.tagName}function Xe(e){return(0,u.j7)(e)}function Ke(e,n){void 0===n&&(n={});const{open:t,onOpenChange:r,dataRef:i,elements:{domReference:l}}=e,{enabled:s=!0,event:a="click",toggle:f=!0,ignoreMouse:d=!1,keyboardHandlers:v=!0,stickIfOpen:m=!0}=n,p=o.useRef(),g=o.useRef(!1),h=o.useMemo((()=>({onPointerDown(e){p.current=e.pointerType},onMouseDown(e){const n=p.current;0===e.button&&"click"!==a&&((0,u.r)(n,!0)&&d||(!t||!f||i.current.openEvent&&m&&"mousedown"!==i.current.openEvent.type?(e.preventDefault(),r(!0,e.nativeEvent,"click")):r(!1,e.nativeEvent,"click")))},onClick(e){const n=p.current;"mousedown"===a&&p.current?p.current=void 0:(0,u.r)(n,!0)&&d||(!t||!f||i.current.openEvent&&m&&"click"!==i.current.openEvent.type?r(!0,e.nativeEvent,"click"):r(!1,e.nativeEvent,"click"))},onKeyDown(e){p.current=void 0,e.defaultPrevented||!v||De(e)||(" "!==e.key||Xe(l)||(e.preventDefault(),g.current=!0),function(e){return(0,c.Re)(e.target)&&"A"===e.target.tagName}(e)||"Enter"===e.key&&r(!t||!f,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!v||De(e)||Xe(l)||" "===e.key&&g.current&&(g.current=!1,r(!t||!f,e.nativeEvent,"click"))}})),[i,l,a,d,v,r,t,m,f]);return o.useMemo((()=>s?{reference:h}:{}),[s,h])}function He(e){return null!=e&&null!=e.clientX}function _e(e,n){void 0===n&&(n={});const{open:t,dataRef:r,elements:{floating:i,domReference:l},refs:s}=e,{enabled:a=!0,axis:f="both",x:d=null,y:v=null}
1=n,m=o.useRef(!1),p=o.useRef(null),[g,h]=o.useState(),[y,R]=o.useState([]),b=(0,u.iW)(((e,n)=>{m.current||r.current.openEvent&&!He(r.current.openEvent)||s.setPositionReference(function(e,n){let t=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var u;const i=(null==e?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},c="x"===n.axis||"both"===n.axis,l="y"===n.axis||"both"===n.axis,s=["mouseenter","mousemove"].includes((null==(u=n.dataRef.current.openEvent)?void 0:u.type)||"")&&"touch"!==n.pointerType;let a=i.width,f=i.height,d=i.x,v=i.y;return null==t&&n.x&&c&&(t=i.x-n.x),null==r&&n.y&&l&&(r=i.y-n.y),d-=t||0,v-=r||0,a=0,f=0,!o||s?(a="y"===n.axis?i.width:0,f="x"===n.axis?i.height:0,d=c&&null!=n.x?n.x:d,v=l&&null!=n.y?n.y:v):o&&!s&&(f="x"===n.axis?i.height:f,a="y"===n.axis?i.width:a),o=!0,{width:a,height:f,x:d,y:v,top:v,right:d+a,bottom:v+f,left:d}}}}(l,{x:e,y:n,axis:f,dataRef:r,pointerType:g}))})),x=(0,u.iW)((e=>{null==d&&null==v&&(t?p.current||R([]):b(e.clientX,e.clientY))})),w=(0,u.r)(g)?i:t,E=o.useCallback((()=>{if(!w||!a||null!=d||null!=v)return;const e=(0,c.Jj)(i);function n(t){const r=(0,u.U9)(t);(0,u.r3)(i,r)?(e.removeEventListener("mousemove",n),p.current=null):b(t.clientX,t.clientY)}if(!r.current.openEvent||He(r.current.openEvent)){e.addEventListener("mousemove",n);const t=()=>{e.removeEventListener("mousemove",n),p.current=null};return p.current=t,t}s.setPositionReference(l)}),[w,a,d,v,i,r,s,l,b]);o.useEffect((()=>E()),[E,y]),o.useEffect((()=>{a&&!i&&(m.current=!1)}),[a,i]),o.useEffect((()=>{!a&&t&&(m.current=!0)}),[a,t]),(0,u.Xj)((()=>{!a||null==d&&null==v||(m.current=!1,b(d,v))}),[a,d,v,b]);const I=o.useMemo((()=>{function e(e){let{pointerType:n}=e;h(n)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:x,onMouseEnter:x}}),[x]);return o.useMemo((()=>a?{reference:I}:{}),[a,I])}const Ue={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},qe={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Be=e=>{var n,t;return{escapeKey:"boolean"==typeof e?e:null!=(n=null==e?void 0:e.escapeKey)&&n,outsidePress:"boolean"==typeof e?e:null==(t=null==e?void 0:e.outsidePress)||t}};function ze(e,n){void 0===n&&(n={});const{open:t,onOpenChange:r,elements:i,dataRef:l}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:f=!0,outsidePressEvent:d="pointerdown",referencePress:v=!1,referencePressEvent:m="pointerdown",ancestorScroll:p=!1,bubbles:g,capture:h}=n,y=_(),R=(0,u.iW)("function"==typeof f?f:()=>!1),b="function"==typeof f?R:f,x=o.useRef(!1),{escapeKey:w,outsidePress:E}=Be(g),{escapeKey:I,outsidePress:k}=Be(h),M=o.useRef(!1),C=(0,u.iW)((e=>{var n;if(!t||!s||!a||"Escape"!==e.key)return;if(M.current)return;const o=null==(n=l.current.floatingContext)?void 0:n.nodeId,i=y?(0,u.El)(y.nodesRef.current,o):[];if(!w&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach((n=>{var t;null==(t=n.context)||!t.open||n.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,(0,u.MM)(e)?e.nativeEvent:e,"escape-key")})),P=(0,u.iW)((e=>{var n;const t=()=>{var n;C(e),null==(n=(0,u.U9)(e))||n.removeEventListener("keydown",t)};null==(n=(0,u.U9)(e))||n.addEventListener("keydown",t)})),T=(0,u.iW)((e=>{var n;const t=l.current.insideReactTree;l.current.insideReactTree=!1;const o=x.current;if(x.current=!1,"click"===d&&o)return;if(t)return;if("function"==typeof b&&!b(e))return;const s=(0,u.U9)(e),a="["+z("inert")+"]",f=(0,u.Me)(i.floating).querySelectorAll(a);let v=(0,c.kK)(s)?s:null;for(;v&&!(0,c.Py)(v);){const e=(0,c.Ow)(v);if((0,c.Py)(e)||!(0,c.kK)(e))break;v=e}if(f.length&&(0,c.kK)(s)&&!(0,u.ex)(s)&&!(0,u.r3)(s,i.floating)&&Array.from(f).every((e=>!(0,u.r3)(v,e))))return;if((0,c.Re)(s)&&O){const n=(0,c.Py)(s),t=(0,c.Dx)(s),r=/auto|scroll/,o=n||r.test(t.overflowX),u=n||r.test(t.overflowY),i=o&&s.clientWidth>0&&s.scrollWidth>s.clientWidth,l=u&&s.clientHeight>0&&s.scrollHeight>s.clientHeight,a="rtl"===t.direction,f=l&&(a?e.offsetX<=s.offsetWidth-s.clientWidth:e.offsetX>s.clientWidth),d=i&&e.offsetY>s.clientHeight;if(f||d)return}const m=null==(n=l.current.floatingContext)?void 0:n.nodeId,p=y&&(0,u.El)(y.nodesRef.current,m).some((n=>{var t;return(0,u.Pe)(e,null==(t=n.context)?void 0:t.elements.floating)}));if((0,u.Pe)(e,i.floating)||(0,u.Pe)(e,i.domReference)||p)return;const g=y?(0,u.El)(y.nodesRef.current,m):[];if(g.length>0){let e=!0;if(g.forEach((n=>{var t;null==(t=n.context)||!t.open||n.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),L=(0,u.iW)((e=>{var n;const t=()=>{var n;T(e),null==(n=(0,u.U9)(e))||n.removeEventListener(d,t)};null==(n=(0,u.U9)(e))||n.addEventListener(d,t)}));o.useEffect((()=>
1{if(!t||!s)return;l.current.__escapeKeyBubbles=w,l.current.__outsidePressBubbles=E;let e=-1;function n(e){r(!1,e,"ancestor-scroll")}function o(){window.clearTimeout(e),M.current=!0}function f(){e=window.setTimeout((()=>{M.current=!1}),(0,c.Pf)()?5:0)}const v=(0,u.Me)(i.floating);a&&(v.addEventListener("keydown",I?P:C,I),v.addEventListener("compositionstart",o),v.addEventListener("compositionend",f)),b&&v.addEventListener(d,k?L:T,k);let m=[];return p&&((0,c.kK)(i.domReference)&&(m=(0,c.Kx)(i.domReference)),(0,c.kK)(i.floating)&&(m=m.concat((0,c.Kx)(i.floating))),!(0,c.kK)(i.reference)&&i.reference&&i.reference.contextElement&&(m=m.concat((0,c.Kx)(i.reference.contextElement)))),m=m.filter((e=>{var n;return e!==(null==(n=v.defaultView)?void 0:n.visualViewport)})),m.forEach((e=>{e.addEventListener("scroll",n,{passive:!0})})),()=>{a&&(v.removeEventListener("keydown",I?P:C,I),v.removeEventListener("compositionstart",o),v.removeEventListener("compositionend",f)),b&&v.removeEventListener(d,k?L:T,k),m.forEach((e=>{e.removeEventListener("scroll",n)})),window.clearTimeout(e)}}),[l,i,a,b,d,t,r,p,s,w,E,C,I,P,T,k,L]),o.useEffect((()=>{l.current.insideReactTree=!1}),[l,b,d]);const j=o.useMemo((()=>({onKeyDown:C,...v&&{[Ue[m]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==m&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[C,r,v,m]),O=o.useMemo((()=>({onKeyDown:C,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[qe[d]]:()=>{l.current.insideReactTree=!0}})),[C,d,l]);return o.useMemo((()=>s?{reference:j,floating:O}:{}),[s,j,O])}function Ve(e){const{open:n=!1,onOpenChange:t,elements:r}=e,i=F(),c=o.useRef({}),[l]=o.useState((()=>D())),s=null!=H();const[a,f]=o.useState(r.reference),d=(0,u.iW)(((e,n,r)=>{c.current.openEvent=e?n:void 0,l.emit("openchange",{open:e,event:n,reason:r,nested:s}),null==t||t(e,n,r)})),v=o.useMemo((()=>({setPositionReference:f})),[]),m=o.useMemo((()=>({reference:a||r.reference||null,floating:r.floating||null,domReference:r.reference})),[a,r.reference,r.floating]);return o.useMemo((()=>({dataRef:c,open:n,onOpenChange:d,elements:m,events:l,floatingId:i,refs:v})),[n,d,m,l,i,v])}function Ye(e){void 0===e&&(e={});const{nodeId:n}=e,t=Ve({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||t,i=r.elements,[l,s]=o.useState(null),[f,d]=o.useState(null),v=(null==i?void 0:i.domReference)||l,m=o.useRef(null),p=_();(0,u.Xj)((()=>{v&&(m.current=v)}),[v]);const g=(0,a.YF)({...e,elements:{...i,...f&&{reference:f}}}),h=o.useCallback((e=>{const n=(0,c.kK)(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;d(n),g.refs.setReference(n)}),[g.refs]),y=o.useCallback((e=>{((0,c.kK)(e)||null===e)&&(m.current=e,s(e)),((0,c.kK)(g.refs.reference.current)||null===g.refs.reference.current||null!==e&&!(0,c.kK)(e))&&g.refs.setReference(e)}),[g.refs]),R=o.useMemo((()=>({...g.refs,setReference:y,setPositionReference:h,domReference:m})),[g.refs,y,h]),b=o.useMemo((()=>({...g.elements,domReference:v})),[g.elements,v]),x=o.useMemo((()=>({...g,...r,refs:R,elements:b,nodeId:n})),[g,R,b,n,r]);return(0,u.Xj)((()=>{r.dataRef.current.floatingContext=x;const e=null==p?void 0:p.nodesRef.current.find((e=>e.id===n));e&&(e.context=x)})),o.useMemo((()=>({...g,context:x,refs:R,elements:b})),[g,R,b,x])}function Ge(){return(0,u.V5)()&&(0,u.G6)()}function Ze(e,n){void 0===n&&(n={});const{open:t,onOpenChange:r,events:i,dataRef:l,elements:s}=e,{enabled:a=!0,visibleOnly:f=!0}=n,d=o.useRef(!1),v=o.useRef(-1),m=o.useRef(!0);o.useEffect((()=>{if(!a)return;const e=(0,c.Jj)(s.domReference);function n(){!t&&(0,c.Re)(s.domReference)&&s.domReference===(0,u.AW)((0,u.Me)(s.domReference))&&(d.current=!0)}function r(){m.current=!0}function o(){m.current=!1}return e.addEventListener("blur",n),Ge()&&(e.addEventListener("keydown",r,!0),e.addEventListener("pointerdown",o,!0)),()=>{e.removeEventListener("blur",n),Ge()&&(e.removeEventListener("keydown",r,!0),e.removeEventListener("pointerdown",o,!0))}}),[s.domReference,t,a]),o.useEffect((()=>{if(a)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{reason:n}=e;"reference-press"!==n&&"escape-key"!==n||(d.current=!0)}}),[i,a]),o.useEffect((()=>()=>{V(v)}),[]);const p=o.useMemo((()=>({onMouseLeave(){d.current=!1},onFocus(e){if(d.current)return;const n=(0,u.U9)(e.nativeEvent);
1if(f&&(0,c.kK)(n))if(Ge()&&!e.relatedTarget){if(!m.current&&!(0,u.j7)(n))return}else if(!(0,u.WL)(n))return;r(!0,e.nativeEvent,"focus")},onBlur(e){d.current=!1;const n=e.relatedTarget,t=e.nativeEvent,o=(0,c.kK)(n)&&n.hasAttribute(z("focus-guard"))&&"outside"===n.getAttribute("data-type");v.current=window.setTimeout((()=>{var e;const i=(0,u.AW)(s.domReference?s.domReference.ownerDocument:document);(n||i!==s.domReference)&&((0,u.r3)(null==(e=l.current.floatingContext)?void 0:e.refs.floating.current,i)||(0,u.r3)(s.domReference,i)||o||r(!1,t,"focus"))}))}})),[l,s.domReference,r,f]);return o.useMemo((()=>a?{reference:p}:{}),[a,p])}function $e(e,n,t){const r=new Map,o="item"===t;let u=e;if(o&&e){const{[R]:n,[b]:t,...r}=e;u=r}return{..."floating"===t&&{tabIndex:-1,[y]:""},...u,...n.map((n=>{const r=n?n[t]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,n)=>n?(Object.entries(n).forEach((n=>{let[t,u]=n;var i;o&&[R,b].includes(t)||(0===t.indexOf("on")?(r.has(t)||r.set(t,[]),"function"==typeof u&&(null==(i=r.get(t))||i.push(u),e[t]=function(){for(var e,n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return null==(e=r.get(t))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[t]=u)})),e):e),{})}}function Je(e){void 0===e&&(e=[]);const n=e.map((e=>null==e?void 0:e.reference)),t=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),u=o.useCallback((n=>$e(n,e,"reference")),n),i=o.useCallback((n=>$e(n,e,"floating")),t),c=o.useCallback((n=>$e(n,e,"item")),r);return o.useMemo((()=>({getReferenceProps:u,getFloatingProps:i,getItemProps:c})),[u,i,c])}const Qe="Escape";function en(e,n,t){switch(e){case"vertical":return n;case"horizontal":return t;default:return n||t}}function nn(e,n){return en(n,e===E||e===I,e===x||e===w)}function tn(e,n,t){return en(n,e===I,t?e===x:e===w)||"Enter"===e||" "===e||""===e}function rn(e,n,t){return en(n,t?e===x:e===w,e===I)}function on(e,n,t,r){return"both"===n||"horizontal"===n&&r&&r>1?e===Qe:en(n,t?e===w:e===x,e===E)}function un(e,n){const{open:t,onOpenChange:r,elements:i,floatingId:l}=e,{listRef:s,activeIndex:a,onNavigate:f=(()=>{}),enabled:d=!0,selectedIndex:v=null,allowEscape:m=!1,loop:p=!1,nested:g=!1,rtl:h=!1,virtual:y=!1,focusItemOnOpen:R="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:E=!0,disabledIndices:k,orientation:M="vertical",parentOrientation:C,cols:P=1,scrollItemIntoView:T=!0,virtualItemRef:L,itemSizes:j,dense:O=!1}=n;const S=(0,u.zd)(i.floating),A=(0,u.II)(S),W=H(),F=_();(0,u.Xj)((()=>{e.dataRef.current.orientation=M}),[e,M]);const N=(0,u.iW)((()=>{f(-1===K.current?null:K.current)})),D=(0,u.Ie)(i.domReference),X=o.useRef(R),K=o.useRef(null!=v?v:-1),U=o.useRef(null),q=o.useRef(!0),B=o.useRef(N),z=o.useRef(!!i.floating),V=o.useRef(t),Y=o.useRef(!1),G=o.useRef(!1),Z=(0,u.II)(k),$=(0,u.II)(t),J=(0,u.II)(T),Q=(0,u.II)(v),[ee,ne]=o.useState(),[te,re]=o.useState(),oe=(0,u.iW)((()=>{function e(e){var n;y?(null!=(n=e.id)&&n.endsWith("-fui-option")&&(e.id=l+"-"+Math.random().toString(16).slice(2,10)),ne(e.id),null==F||F.events.emit("virtualfocus",e),L&&(L.current=e)):ce(e,{sync:Y.current,preventScroll:!0})}const n=s.current[K.current],t=G.current;n&&e(n);(Y.current?e=>e():requestAnimationFrame)((()=>{const r=s.current[K.current]||n;if(!r)return;n||e(r);const o=J.current;o&&ie&&(t||!q.current)&&(null==r.scrollIntoView||r.scrollIntoView("boolean"==typeof o?{block:"nearest",inline:"nearest"}:o))}))}));(0,u.Xj)((()=>{d&&(t&&i.floating?X.current&&null!=v&&(G.current=!0,K.current=v,N()):z.current&&(K.current=-1,B.current()))}),[d,t,i.floating,v,N]),(0,u.Xj)((()=>{if(d&&t&&i.floating)if(null==a){if(Y.current=!1,null!=Q.current)return;if(z.current&&(K.current=-1,oe()),(!V.current||!z.current)&&X.current&&(null!=U.current||!0===X.current&&null==U.current)){let e=0;const n=()=>
1{if(null==s.current[0]){if(e<2){(e?requestAnimationFrame:queueMicrotask)(n)}e++}else K.current=null==U.current||tn(U.current,M,h)||g?(0,u.h$)(s,Z.current):(0,u.zc)(s,Z.current),U.current=null,N()};n()}}else(0,u.VP)(s,a)||(K.current=a,oe(),G.current=!1)}),[d,t,i.floating,a,Q,g,s,M,h,N,oe,Z]),(0,u.Xj)((()=>{var e;if(!d||i.floating||!F||y||!z.current)return;const n=F.nodesRef.current,t=null==(e=n.find((e=>e.id===W)))||null==(e=e.context)?void 0:e.elements.floating,r=(0,u.AW)((0,u.Me)(i.floating)),o=n.some((e=>e.context&&(0,u.r3)(e.context.elements.floating,r)));t&&!o&&q.current&&t.focus({preventScroll:!0})}),[d,i.floating,F,W,y]),(0,u.Xj)((()=>{if(d&&F&&y&&!W)return F.events.on("virtualfocus",e),()=>{F.events.off("virtualfocus",e)};function e(e){re(e.id),L&&(L.current=e)}}),[d,F,y,W,L]),(0,u.Xj)((()=>{B.current=N,V.current=t,z.current=!!i.floating})),(0,u.Xj)((()=>{t||(U.current=null,X.current=R)}),[t,R]);const ue=null!=a,ie=o.useMemo((()=>{function e(e){if(!$.current)return;const n=s.current.indexOf(e);-1!==n&&K.current!==n&&(K.current=n,N())}return{onFocus(n){let{currentTarget:t}=n;Y.current=!0,e(t)},onClick:e=>{let{currentTarget:n}=e;return n.focus({preventScroll:!0})},onMouseMove(n){let{currentTarget:t}=n;Y.current=!0,G.current=!1,b&&e(t)},onPointerLeave(e){let{pointerType:n}=e;var t;q.current&&"touch"!==n&&(Y.current=!0,b&&(K.current=-1,N(),y||null==(t=A.current)||t.focus({preventScroll:!0})))}}}),[$,A,b,s,N,y]),le=o.useCallback((()=>{var e;return null!=C?C:null==F||null==(e=F.nodesRef.current.find((e=>e.id===W)))||null==(e=e.context)||null==(e=e.dataRef)?void 0:e.current.orientation}),[W,F,C]),se=(0,u.iW)((e=>{if(q.current=!1,Y.current=!0,229===e.which)return;if(!$.current&&e.currentTarget===A.current)return;if(g&&on(e.key,M,h,P))return nn(e.key,le())||(0,u.p7)(e),r(!1,e.nativeEvent,"list-navigation"),void((0,c.Re)(i.domReference)&&(y?null==F||F.events.emit("virtualfocus",i.domReference):i.domReference.focus()));
1const n=K.current,o=(0,u.h$)(s,k),l=(0,u.zc)(s,k);if(D||("Home"===e.key&&((0,u.p7)(e),K.current=o,N()),"End"===e.key&&((0,u.p7)(e),K.current=l,N())),P>1){const n=j||Array.from({length:s.current.length},(()=>({width:1,height:1}))),t=(0,u.fe)(n,P,O),r=t.findIndex((e=>null!=e&&!(0,u.Nm)(s,e,k))),i=t.reduce(((e,n,t)=>null==n||(0,u.Nm)(s,n,k)?e:t),-1),c=t[(0,u.xR)({current:t.map((e=>null!=e?s.current[e]:null))},{event:e,orientation:M,loop:p,rtl:h,cols:P,disabledIndices:(0,u.w_)([...("function"!=typeof k?k:null)||s.current.map(((e,n)=>(0,u.Nm)(s,n,k)?n:void 0)),void 0],t),minIndex:r,maxIndex:i,prevIndex:(0,u.XH)(K.current>l?o:K.current,n,t,P,e.key===I?"bl":e.key===(h?x:w)?"tr":"tl"),stopEvent:!0})];if(null!=c&&(K.current=c,N()),"both"===M)return}if(nn(e.key,M)){if((0,u.p7)(e),t&&!y&&(0,u.AW)(e.currentTarget.ownerDocument)===e.currentTarget)return K.current=tn(e.key,M,h)?o:l,void N();tn(e.key,M,h)?K.current=p?n>=l?m&&n!==s.current.length?-1:o:(0,u.aF)(s,{startingIndex:n,disabledIndices:k}):Math.min(l,(0,u.aF)(s,{startingIndex:n,disabledIndices:k})):K.current=p?n<=o?m&&-1!==n?s.current.length:l:(0,u.aF)(s,{startingIndex:n,decrement:!0,disabledIndices:k}):Math.max(o,(0,u.aF)(s,{startingIndex:n,decrement:!0,disabledIndices:k})),(0,u.VP)(s,K.current)&&(K.current=-1),N()}})),ae=o.useMemo((()=>y&&t&&ue&&{"aria-activedescendant":te||ee}),[y,t,ue,te,ee]),fe=o.useMemo((()=>({"aria-orientation":"both"===M?void 0:M,...D?{}:ae,onKeyDown:se,onPointerMove(){q.current=!0}})),[ae,se,M,D]),de=o.useMemo((()=>{function e(e){"auto"===R&&(0,u.Zj)(e.nativeEvent)&&(X.current=!0)}function n(e){X.current=R,"auto"===R&&(0,u.cr)(e.nativeEvent)&&(X.current=!0)}return{...ae,onKeyDown(e){q.current=!1;const n=e.key.startsWith("Arrow"),o=["Home","End"].includes(e.key),i=n||o,c=rn(e.key,M,h),l=on(e.key,M,h,P),a=rn(e.key,le(),h),f=nn(e.key,M),d=(g?a:f)||"Enter"===e.key||""===e.key.trim();if(y&&t){const n=null==F?void 0:F.nodesRef.current.find((e=>null==e.parentId)),t=F&&n?(0,u.m_)(F.nodesRef.current,n.id):null;if(i&&t&&L){const n=new KeyboardEvent("keydown",{key:e.key,bubbles:!0});if(c||l){var m,p;const r=(null==(m=t.context)?void 0:m.elements.domReference)===e.currentTarget,o=l&&!r?null==(p=t.context)?void 0:p.elements.domReference:c?s.current.find((e=>(null==e?void 0:e.id)===ee)):null;o&&((0,u.p7)(e),o.dispatchEvent(n),re(void 0))}var R;if((f||o)&&t.context)if(t.context.open&&t.parentId&&e.currentTarget!==t.context.elements.domReference)return(0,u.p7)(e),void(null==(R=t.context.elements.domReference)||R.dispatchEvent(n))}return se(e)}if(t||E||!n){if(d){const n=nn(e.key,le());U.current=g&&n?null:e.key}g?a&&((0,u.p7)(e),t?(K.current=(0,u.h$)(s,Z.current),N()):r(!0,e.nativeEvent,"list-navigation")):f&&(null!=v&&(K.current=v),(0,u.p7)(e),!t&&E?r(!0,e.nativeEvent,"list-navigation"):se(e),t&&N())}},onFocus(){t&&!y&&(K.current=-1,N())},onPointerDown:n,onPointerEnter:n,onMouseDown:e,onClick:e}}),[ee,ae,P,se,Z,R,s,g,N,r,t,E,M,le,h,v,F,y,L]);return o.useMemo((()=>d?{reference:de,floating:fe,item:ie}:{}),[d,de,fe,ie])}const cn=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function ln(e,n){var t,r;void 0===n&&(n={});const{open:i,elements:c,floatingId:l}=e,{enabled:s=!0,role:a="dialog"}=n,f=F(),d=(null==(t=c.domReference)?void 0:t.id)||f,v=o.useMemo((()=>{var e;return(null==(e=(0,u.zd)(c.floating))?void 0:e.id)||l}),[c.floating,l]),m=null!=(r=cn.get(a))?r:a,p=null!=H(),g=o.useMemo((()=>"tooltip"===m||"label"===a?{["aria-"+("label"===a?"labelledby":"describedby")]:i?v:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":"alertdialog"===m?"dialog":m,"aria-controls":i?v:void 0,..."listbox"===m&&{role:"combobox"},..."menu"===m&&{id:d},..."menu"===m&&p&&{role:"menuitem"},..."select"===a&&{"aria-autocomplete":"none"},..."combobox"===a&&{"aria-autocomplete":"list"}}),[m,v,p,i,d,a]),h=o.useMemo((()=>{const e={id:v,...m&&{role:m}};return"tooltip"===m||"label"===a?e:{...e,..."menu"===m&&{"aria-labelledby":d}}}),[m,v,d,a]),y=o.useCallback((e=>{let{active:n,selected:t}=e;const r={role:"option",...n&&{id:v+"-fui-option"}};switch(a){case"select":case"combobox":return{...r,"aria-selected":t}}return{}}),[v,a]);return o.useMemo((()=>s?{reference:g,floating:h,item:y}:{}),[s,g,h,y])}const sn=e=>
1e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((e,n)=>(n?"-":"")+e.toLowerCase()));function an(e,n){return"function"==typeof e?e(n):e}function fn(e,n){void 0===n&&(n={});const{open:t,elements:{floating:r}}=e,{duration:i=250}=n,c=("number"==typeof i?i:i.close)||0,[l,a]=o.useState("unmounted"),f=function(e,n){const[t,r]=o.useState(e);return e&&!t&&r(!0),o.useEffect((()=>{if(!e&&t){const e=setTimeout((()=>r(!1)),n);return()=>clearTimeout(e)}}),[e,t,n]),t}(t,c);return f||"close"!==l||a("unmounted"),(0,u.Xj)((()=>{if(r){if(t){a("initial");const e=requestAnimationFrame((()=>{s.flushSync((()=>{a("open")}))}));return()=>{cancelAnimationFrame(e)}}a("close")}}),[t,r]),{isMounted:f,status:l}}function dn(e,n){void 0===n&&(n={});const{initial:t={opacity:0},open:r,close:i,common:c,duration:l=250}=n,s=e.placement,a=s.split("-")[0],f=o.useMemo((()=>({side:a,placement:s})),[a,s]),d="number"==typeof l,v=(d?l:l.open)||0,m=(d?l:l.close)||0,[p,g]=o.useState((()=>({...an(c,f),...an(t,f)}))),{isMounted:h,status:y}=fn(e,{duration:l}),R=(0,u.II)(t),b=(0,u.II)(r),x=(0,u.II)(i),w=(0,u.II)(c);return(0,u.Xj)((()=>{const e=an(R.current,f),n=an(x.current,f),t=an(w.current,f),r=an(b.current,f)||Object.keys(e).reduce(((e,n)=>(e[n]="",e)),{});if("initial"===y&&g((n=>({transitionProperty:n.transitionProperty,...t,...e}))),"open"===y&&g({transitionProperty:Object.keys(r).map(sn).join(","),transitionDuration:v+"ms",...t,...r}),"close"===y){const r=n||e;g({transitionProperty:Object.keys(r).map(sn).join(","),transitionDuration:m+"ms",...t,...r})}}),[m,x,R,b,w,v,y,f]),{isMounted:h,styles:p}}function vn(e,n){var t;const{open:r,dataRef:i}=e,{listRef:c,activeIndex:l,onMatch:s,onTypingChange:a,enabled:f=!0,findMatch:d=null,resetMs:v=750,ignoreKeys:m=[],selectedIndex:p=null}=n,g=o.useRef(-1),h=o.useRef(""),y=o.useRef(null!=(t=null!=p?p:l)?t:-1),R=o.useRef(null),b=(0,u.iW)(s),x=(0,u.iW)(a),w=(0,u.II)(d),E=(0,u.II)(m);(0,u.Xj)((()=>{r&&(V(g),R.current=null,h.current="")}),[r]),(0,u.Xj)((()=>{var e;r&&""===h.current&&(y.current=null!=(e=null!=p?p:l)?e:-1)}),[r,p,l]);const I=(0,u.iW)((e=>{e?i.current.typing||(i.current.typing=e,x(e)):i.current.typing&&(i.current.typing=e,x(e))})),k=(0,u.iW)((e=>{function n(e,n,t){const r=w.current?w.current(n,t):n.find((e=>0===(null==e?void 0:e.toLocaleLowerCase().indexOf(t.toLocaleLowerCase()))));return r?e.indexOf(r):-1}const t=c.current;if(h.current.length>0&&" "!==h.current[0]&&(-1===n(t,t,h.current)?I(!1):" "===e.key&&(0,u.p7)(e)),null==t||E.current.includes(e.key)||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;r&&" "!==e.key&&((0,u.p7)(e),I(!0));t.every((e=>{var n,t;return!e||(null==(n=e[0])?void 0:n.toLocaleLowerCase())!==(null==(t=e[1])?void 0:t.toLocaleLowerCase())}))&&h.current===e.key&&(h.current="",y.current=R.current),h.current+=e.key,V(g),g.current=window.setTimeout((()=>{h.current="",y.current=R.current,I(!1)}),v);const o=y.current,i=n(t,[...t.slice((o||0)+1),...t.slice(0,(o||0)+1)],h.current);-1!==i?(b(i),R.current=i):" "!==e.key&&(h.current="",I(!1))})),M=o.useMemo((()=>({onKeyDown:k})),[k]),C=o.useMemo((()=>({onKeyDown:k,onKeyUp(e){" "===e.key&&I(!1)}})),[k,I]);return o.useMemo((()=>f?{reference:M,floating:C}:{}),[f,M,C])}function mn(e,n){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:n}}}}const pn=e=>({name:"inner",options:e,async fn(n){const{listRef:t,overflowRef:r,onFallbackChange:o,offset:u=0,index:i=0,minItemsVisible:c=4,referenceOverflowThreshold:l=0,scrollRef:f,...v}=(0,d.ku)(e,n),{rects:m,platform:p,elements:{floating:g}}=n,h=t.current[i],y=(null==f?void 0:f.current)||g,R=g.clientTop||y.clientTop,b=0!==g.clientTop,x=0!==y.clientTop,w=g===y;if(!h)return{};const E={...n,...await(0,a.cv)(-h.offsetTop-g.clientTop-m.reference.height/2-h.offsetHeight/2-u).fn(n)},I=await p.detectOverflow(mn(E,y.scrollHeight+R+g.clientTop),v),k=await p.detectOverflow(E,{...v,elementContext:"reference"}),M=(0,d.Fp)(0,I.top),C=E.y+M,P=(y.scrollHeight>y.clientHeight?e=>e:d.NM)((0,d.Fp)(0,y.scrollHeight+(b&&w||x?2*R:0)-M-(0,d.Fp)(0,I.bottom)));if(y.style.maxHeight=P+"px",y.scrollTop=M,o){const e=y.offsetHeight<h.offsetHeight*(0,d.VV)(c,t.current.length)-1||k.top>=-l||k.bottom>=-l;s.flushSync((()=>o(e)))}return r&&(r.current=await p.detectOverflow(mn({...E,y:C},y.offsetHeight+R+g.clientTop),v)),{y:C}}});function gn(e,n){const{open:t,elements:r}=e,{enabled:i=!0,overflowRef:c,scrollRef:l,onChange:a}=n,f=(0,u.iW)(a),d=o.useRef(!1),v=o.useRef(null),m=o.useRef(null);o.useEffect((()=>
vendor: 4,043 bytes, lines 1-2
1{if(!i)return;function e(e){if(e.ctrlKey||!n||null==c.current)return;const t=e.deltaY,r=c.current.top>=-.5,o=c.current.bottom>=-.5,i=n.scrollHeight-n.clientHeight,l=t<0?-1:1,a=t<0?"max":"min";n.scrollHeight<=n.clientHeight||(!r&&t>0||!o&&t<0?(e.preventDefault(),s.flushSync((()=>{f((e=>e+Math[a](t,i*l)))}))):/firefox/i.test((0,u.ij)())&&(n.scrollTop+=t))}const n=(null==l?void 0:l.current)||r.floating;return t&&n?(n.addEventListener("wheel",e),requestAnimationFrame((()=>{v.current=n.scrollTop,null!=c.current&&(m.current={...c.current})})),()=>{v.current=null,m.current=null,n.removeEventListener("wheel",e)}):void 0}),[i,t,r.floating,c,l,f]);const p=o.useMemo((()=>({onKeyDown(){d.current=!0},onWheel(){d.current=!1},onPointerMove(){d.current=!1},onScroll(){const e=(null==l?void 0:l.current)||r.floating;if(c.current&&e&&d.current){if(null!==v.current){const n=e.scrollTop-v.current;(c.current.bottom<-.5&&n<-1||c.current.top<-.5&&n>1)&&s.flushSync((()=>f((e=>e+n))))}requestAnimationFrame((()=>{v.current=e.scrollTop}))}}})),[r.floating,f,c,l]);return o.useMemo((()=>i?{floating:p}:{}),[i,p])}function hn(e,n,t){void 0===t&&(t=!0);return e.filter((e=>{var r;return e.parentId===n&&(!t||(null==(r=e.context)?void 0:r.open))})).flatMap((n=>[n,...hn(e,n.id,t)]))}function yn(e,n){const[t,r]=e;let o=!1;const u=n.length;for(let i=0,c=u-1;i<u;c=i++){const[e,u]=n[i]||[0,0],[l,s]=n[c]||[0,0];u>=r!=s>=r&&t<=(l-e)*(r-u)/(s-u)+e&&(o=!o)}return o}function Rn(e){void 0===e&&(e={});const{buffer:n=.5,blockPointerEvents:t=!1,requireIntent:r=!0}=e,o={current:-1};let u=!1,i=null,l=null,s="undefined"!=typeof performance?performance.now():0;const a=e=>{let{x:t,y:a,placement:f,elements:d,onClose:v,nodeId:m,tree:p}=e;return function(e){function g(){V(o),v()}if(V(o),!d.domReference||!d.floating||null==f||null==t||null==a)return;const{clientX:h,clientY:y}=e,R=[h,y],b=function(e){return"composedPath"in e?e.composedPath()[0]:e.target}(e),x="mouseleave"===e.type,w=le(d.floating,b),E=le(d.domReference,b),I=d.domReference.getBoundingClientRect(),k=d.floating.getBoundingClientRect(),M=f.split("-")[0],C=t>k.right-k.width/2,P=a>k.bottom-k.height/2,T=function(e,n){return e[0]>=n.x&&e[0]<=n.x+n.width&&e[1]>=n.y&&e[1]<=n.y+n.height}(R,I),L=k.width>I.width,j=k.height>I.height,O=(L?I:k).left,S=(L?I:k).right,A=(j?I:k).top,W=(j?I:k).bottom;if(w&&(u=!0,!x))return;if(E&&(u=!1),E&&!x)return void(u=!0);if(x&&(0,c.kK)(e.relatedTarget)&&le(d.floating,e.relatedTarget))return;if(p&&hn(p.nodesRef.current,m).length)return;if("top"===M&&a>=I.bottom-1||"bottom"===M&&a<=I.top+1||"left"===M&&t>=I.right-1||"right"===M&&t<=I.left+1)return g();let F=[];switch(M){case"top":F=[[O,I.top+1],[O,k.bottom-1],[S,k.bottom-1],[S,I.top+1]];break;case"bottom":F=[[O,k.top+1],[O,I.bottom-1],[S,I.bottom-1],[S,k.top+1]];break;case"left":F=[[k.right-1,W],[k.right-1,A],[I.left+1,A],[I.left+1,W]];break;case"right":F=[[I.right-1,W],[I.right-1,A],[k.left+1,A],[k.left+1,W]]}if(!yn([h,y],F)){if(u&&!T)return g();if(!x&&r){const n=function(e,n){const t=performance.now(),r=t-s;if(null===i||null===l||0===r)return i=e,l=n,s=t,null;const o=e-i,u=n-l,c=Math.sqrt(o*o+u*u);return i=e,l=n,s=t,c/r}(e.clientX,e.clientY);if(null!==n&&n<.1)return g()}yn([h,y],function(e){let[t,r]=e;switch(M){case"top":return[[L?t+n/2:C?t+4*n:t-4*n,r+n+1],[L?t-n/2:C?t+4*n:t-4*n,r+n+1],...[[k.left,C||L?k.bottom-n:k.top],[k.right,C?L?k.bottom-n:k.top:k.bottom-n]]];case"bottom":return[[L?t+n/2:C?t+4*n:t-4*n,r-n],[L?t-n/2:C?t+4*n:t-4*n,r-n],...[[k.left,C||L?k.top+n:k.bottom],[k.right,C?L?k.top+n:k.bottom:k.top+n]]];case"left":{const e=[t+n+1,j?r+n/2:P?r+4*n:r-4*n],o=[t+n+1,j?r-n/2:P?r+4*n:r-4*n];return[...[[P||j?k.right-n:k.left,k.top],[P?j?k.right-n:k.left:k.right-n,k.bottom]],e,o]}case"right":return[[t-n,j?r+n/2:P?r+4*n:r-4*n],[t-n,j?r-n/2:P?r+4*n:r-4*n],...[[P||j?k.left+n:k.right,k.top],[P?j?k.left+n:k.right:k.left+n,k.bottom]]]}}([t,a]))?!u&&r&&(o.current=window.setTimeout(g,40)):g()}}};return a.__options={blockPointerEvents:t},a}}}]); 2//# sourceMappingURL=c7980ebc-d05a4f9b5d48fdd7eec4.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.