PageSourceSearch

https://tetonadventuresrv.com/c7980ebc-5018125d3a282bbdefa5.js

js tetonadventuresrv.com collected 2026-09-29 16:58:45 UTC 55,295 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9598],{41748:function(e,n,t){var r;t.r(n),t.d(n,{Composite:function(){return W},CompositeItem:function(){return H},FloatingArrow:function(){return V},FloatingDelayGroup:function(){return de},FloatingFocusManager:function(){return He},FloatingList:function(){return A},FloatingNode:function(){return te},FloatingOverlay:function(){return ze},FloatingPortal:function(){return Ne},FloatingTree:function(){return re},arrow:function(){return a.UE},autoPlacement:function(){return a.RK},autoUpdate:function(){return f.ll},computePosition:function(){return f.rD},detectOverflow:function(){return f.__},flip:function(){return a.UU},getOverflowAncestors:function(){return i.v9},hide:function(){return a.jD},inline:function(){return a.mG},inner:function(){return wn},limitShift:function(){return a.ER},offset:function(){return a.cY},platform:function(){return f.iD},safePolygon:function(){return Mn},shift:function(){return a.BN},size:function(){return a.Ej},useClick:function(){return Xe},useClientPoint:function(){return Ze},useDelayGroup:function(){return ve},useDelayGroupContext:function(){return fe},useDismiss:function(){return en},useFloating:function(){return tn},useFloatingNodeId:function(){return ne},useFloatingParentNodeId:function(){return J},useFloatingPortalNode:function(){return Ae},useFloatingRootContext:function(){return nn},useFloatingTree:function(){return ee},useFocus:function(){return rn},useHover:function(){return le},useId:function(){return X},useInnerOffset:function(){return In},useInteractions:function(){return ln},useListItem:function(){return N},useListNavigation:function(){return mn},useMergeRefs:function(){return d},useRole:function(){return gn},useTransitionStatus:function(){return bn},useTransitionStyles:function(){return En},useTypeahead:function(){return Rn}});var o=t(63696),u=t(63582),c=t(58015),i=t(977),l=t(13066),s=t(78325),a=t(94621),f=t(8083);function d(e){return o.useMemo((()=>e.every((e=>null==e))?null:n=>{e.forEach((e=>{"function"==typeof e?e(n):null!=e&&(e.current=n)}))}),e)}const v={...r||(r=t.t(o,2))},m=v.useInsertionEffect||(e=>e());function p(e){const n=o.useRef((()=>{0}));return m((()=>{n.current=e})),o.useCallback((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return null==n.current?void 0:n.current(...t)}),[])}const g="ArrowUp",h="ArrowDown",y="ArrowLeft",b="ArrowRight";function E(e,n,t){return Math.floor(e/n)!==t}function R(e,n){return n<0||n>=e.current.length}function x(e,n){return I(e,{disabledIndices:n})}function w(e,n){return I(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:n})}function I(e,n){let{startingIndex:t=-1,decrement:r=!1,disabledIndices:o,amount:u=1}=void 0===n?{}:n;const c=e.current;let i=t;do{i+=r?-u:u}while(i>=0&&i<=c.length-1&&O(c,i,o));return i}function k(e,n){let{event:t,orientation:r,loop:o,cols:i,disabledIndices:l,minIndex:s,maxIndex:a,prevIndex:f,stopEvent:d=!1}=n,v=f;if(t.key===g){if(d&&(0,u.jo)(t),-1===f)v=a;else if(v=I(e,{startingIndex:v,amount:i,decrement:!0,disabledIndices:l}),o&&(f-i<s||v<0)){const e=f%i,n=a%i,t=a-(n-e);v=n===e?a:n>e?t:t-i}
1R(e,v)&&(v=f)}if(t.key===h&&(d&&(0,u.jo)(t),-1===f?v=s:(v=I(e,{startingIndex:f,amount:i,disabledIndices:l}),o&&f+i>a&&(v=I(e,{startingIndex:f%i-i,amount:i,disabledIndices:l}))),R(e,v)&&(v=f)),"both"===r){const n=(0,c.RI)(f/i);t.key===b&&(d&&(0,u.jo)(t),f%i!=i-1?(v=I(e,{startingIndex:f,disabledIndices:l}),o&&E(v,i,n)&&(v=I(e,{startingIndex:f-f%i-1,disabledIndices:l}))):o&&(v=I(e,{startingIndex:f-f%i-1,disabledIndices:l})),E(v,i,n)&&(v=f)),t.key===y&&(d&&(0,u.jo)(t),f%i!=0?(v=I(e,{startingIndex:f,decrement:!0,disabledIndices:l}),o&&E(v,i,n)&&(v=I(e,{startingIndex:f+(i-f%i),decrement:!0,disabledIndices:l}))):o&&(v=I(e,{startingIndex:f+(i-f%i),decrement:!0,disabledIndices:l})),E(v,i,n)&&(v=f));const r=(0,c.RI)(a/i)===n;R(e,v)&&(v=o&&r?t.key===y?a:I(e,{startingIndex:f-f%i-1,disabledIndices:l}):f)}return v}function M(e,n,t){const r=[];let o=0;return e.forEach(((e,u)=>{let{width:c,height:i}=e,l=!1;for(t&&(o=0);!l;){const e=[];for(let t=0;t<c;t++)for(let r=0;r<i;r++)e.push(o+t+r*n);o%n+c<=n&&e.every((e=>null==r[e]))?(e.forEach((e=>{r[e]=u})),l=!0):o++}})),[...r]}function C(e,n,t,r,o){if(-1===e)return-1;const u=t.indexOf(e),c=n[e];switch(o){case"tl":return u;case"tr":return c?u+c.width-1:u;case"bl":return c?u+(c.height-1)*r:u;case"br":return t.lastIndexOf(e)}}function T(e,n){return n.flatMap(((n,t)=>e.includes(n)?[t]:[]))}function O(e,n,t){if(t)return t.includes(n);const r=e[n];return null==r||r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")}let L=0;function S(e,n){void 0===n&&(n={});const{preventScroll:t=!1,cancelPrevious:r=!0,sync:o=!1}=n;r&&cancelAnimationFrame(L);const u=()=>null==e?void 0:e.focus({preventScroll:t});o?u():L=requestAnimationFrame(u)}var P="undefined"!=typeof document?o.useLayoutEffect:o.useEffect;function F(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 D=o.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function A(e){const{children:n,elementsRef:t,labelsRef:r}=e,[u,c]=o.useState((()=>new Map)),i=o.useCallback((e=>{c((n=>new Map(n).set(e,null)))}),[]),l=o.useCallback((e=>{c((n=>{const t=new Map(n);return t.delete(e),t}))}),[]);return P((()=>{const e=new Map(u);Array.from(e.keys()).sort(F).forEach(((n,t)=>{e.set(n,t)})),function(e,n){if(e.size!==n.size)return!1;for(const[t,r]of e.entries())if(r!==n.get(t))return!1;return!0}(u,e)||c(e)}),[u]),o.createElement(D.Provider,{value:o.useMemo((()=>({register:i,unregister:l,map:u,elementsRef:t,labelsRef:r})),[i,l,u,t,r])},n)}function N(e){void 0===e&&(e={});const{label:n}=e,{register:t,unregister:r,map:u,elementsRef:c,labelsRef:i}=o.useContext(D),[l,s]=o.useState(null),a=o.useRef(null),f=o.useCallback((e=>{if(a.current=e,null!==l&&(c.current[l]=e,i)){var t;const r=void 0!==n;i.current[l]=r?n:null!=(t=null==e?void 0:e.textContent)?t:null}}),[l,c,i,n]);return P((()=>{const e=a.current;if(e)return t(e),()=>{r(e)}}),[t,r]),P((()=>{const e=a.current?u.get(a.current):null;null!=e&&s(e)}),[u]),o.useMemo((()=>({ref:f,index:null==l?-1:l})),[l,f])}function K(e,n){return"function"==typeof e?e(n):e?o.cloneElement(e,n):o.createElement("div",n)}const q=o.createContext({activeIndex:0,onNavigate:()=>{}}),j=[y,b],Y=[g,h],_=[...j,...Y],W=o.forwardRef((function(e,n){const{render:t,orientation:r="both",loop:u=!0,cols:c=1,disabledIndices:i,activeIndex:l,onNavigate:s,itemSizes:a,dense:f=!1,...d}=e,[v,m]=o.useState(0),E=null!=l?l:v,L=p(null!=s?s:m),P=o.useRef([]),F=t&&"function"!=typeof t?t.props:{},D=o.useMemo((()=>({activeIndex:E,onNavigate:L})),[E,L]),N=c>1;const W={...d,...F,ref:n,"aria-orientation":"both"===r?void 0:r,onKeyDown(e){null==d.onKeyDown||d.onKeyDown(e),null==F.onKeyDown||F.onKeyDown(e),function(e){if(!_.includes(e.key))return;let n=E;const t=x(P,i),o=w(P,i);if(N){const l=a||Array.from({length:P.current.length},(()=>({width:1,height:1}))),s=M(l,c,f),d=s.findIndex((e=>null!=e&&!O(P.current,e,i))),v=s.reduce(((e,n,t)=>null==n||O(P.current,n,i)?e:t),-1);n=s[k({current:s.map((e=>e?P.current[e]:null))},{event:e,orientation:r,loop:u,cols:c,disabledIndices:T([...i||P.current.map(((e,n)=>O(P.current,n)?n:void 0)),void 0],s),minIndex:d,maxIndex:v,prevIndex:C(E>o?t:E,l,s,c,e.key===h?"bl":e.key===b?"tr":"tl")})]}const l={horizontal:[b],vertical:[h],both:[b,h]}[r],s={horizontal:[y],vertical:[g],both:[y,g]}[r],d=N?_:{horizontal:j,vertical:Y,both:_}[r];
1n===E&&[...l,...s].includes(e.key)&&(n=u&&n===o&&l.includes(e.key)?t:u&&n===t&&s.includes(e.key)?o:I(P,{startingIndex:n,decrement:s.includes(e.key),disabledIndices:i})),n===E||R(P,n)||(e.stopPropagation(),d.includes(e.key)&&e.preventDefault(),L(n),queueMicrotask((()=>{S(P.current[n])})))}(e)}};return o.createElement(q.Provider,{value:D},o.createElement(A,{elementsRef:P},K(t,W)))})),H=o.forwardRef((function(e,n){const{render:t,...r}=e,u=t&&"function"!=typeof t?t.props:{},{activeIndex:c,onNavigate:i}=o.useContext(q),{ref:l,index:s}=N(),a=d([l,n,u.ref]),f=c===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),i(s)}})}));function B(){return B=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},B.apply(this,arguments)}let z=!1,U=0;const G=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+U++;const X=v.useId||function(){const[e,n]=o.useState((()=>z?G():void 0));return P((()=>{null==e&&n(G())}),[]),o.useEffect((()=>{z=!0}),[]),e};const V=o.forwardRef((function(e,n){const{context:{placement:t,elements:{floating:r},middlewareData:{arrow:u}},width:c=14,height:l=7,tipRadius:s=0,strokeWidth:a=0,staticOffset:f,stroke:d,d:v,style:{transform:m,...p}={},...g}=e;const h=X(),[y,b]=o.useState(!1);if(P((()=>{if(!r)return;"rtl"===(0,i.L9)(r).direction&&b(!0)}),[r]),!r)return null;const E=2*a,R=E/2,x=c/2*(s/-8+1),w=l/2*s/4,[I,k]=t.split("-"),M=!!v,C="top"===I||"bottom"===I,T=f&&"end"===k?"bottom":"top";let O=f&&"end"===k?"right":"left";f&&y&&(O="end"===k?"left":"right");const L=null!=(null==u?void 0:u.x)?f||u.x:"",S=null!=(null==u?void 0:u.y)?f||u.y:"",F=v||"M0,0 H"+c+" L"+(c-x)+","+(l-w)+" Q"+c/2+","+l+" "+x+","+(l-w)+" Z",D={top:M?"rotate(180deg)":"",left:M?"rotate(90deg)":"rotate(-90deg)",bottom:M?"":"rotate(180deg)",right:M?"rotate(-90deg)":"rotate(90deg)"}[I];return o.createElement("svg",B({},g,{"aria-hidden":!0,ref:n,width:M?c:c+E,height:c,viewBox:"0 0 "+c+" "+(l>c?l:c),style:{position:"absolute",pointerEvents:"none",[O]:L,[T]:S,[I]:C||M?"100%":"calc(100% - "+E/2+"px)",transform:""+D+(null!=m?m:""),...p}}),E>0&&o.createElement("path",{clipPath:"url(#"+h+")",fill:"none",stroke:d,strokeWidth:E+(v?0:1),d:F}),o.createElement("path",{stroke:E&&!v?g.fill:"none",d:F}),o.createElement("clipPath",{id:h},o.createElement("rect",{x:-R,y:R*(M?-1:1),width:c+E,height:c})))}));function Z(){const e=new Map;return{emit(n,t){var r;null==(r=e.get(n))||r.forEach((e=>e(t)))},on(n,t){e.set(n,[...e.get(n)||[],t])},off(n,t){var r;e.set(n,(null==(r=e.get(n))?void 0:r.filter((e=>e!==t)))||[])}}}const $=o.createContext(null),Q=o.createContext(null),J=()=>{var e;return(null==(e=o.useContext($))?void 0:e.id)||null},ee=()=>o.useContext(Q);function ne(e){const n=X(),t=ee(),r=J(),o=e||r;return P((()=>{const e={id:n,parentId:o};return null==t||t.addNode(e),()=>{null==t||t.removeNode(e)}}),[t,n,o]),n}function te(e){const{children:n,id:t}=e,r=J();return o.createElement($.Provider,{value:o.useMemo((()=>({id:t,parentId:r})),[t,r])},n)}function re(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))}
1),[]),c=o.useState((()=>Z()))[0];return o.createElement(Q.Provider,{value:o.useMemo((()=>({nodesRef:t,addNode:r,removeNode:u,events:c})),[r,u,c])},n)}function oe(e){return"data-floating-ui-"+e}function ue(e){const n=(0,o.useRef)(e);return P((()=>{n.current=e})),n}const ce=oe("safe-polygon");function ie(e,n,t){return t&&!(0,u.Go)(t)?0:"number"==typeof e?e:null==e?void 0:e[n]}function le(e,n){void 0===n&&(n={});const{open:t,onOpenChange:r,dataRef:c,events:l,elements:s}=e,{enabled:a=!0,delay:f=0,handleClose:d=null,mouseOnly:v=!1,restMs:m=0,move:g=!0}=n,h=ee(),y=J(),b=ue(d),E=ue(f),R=ue(t),x=o.useRef(),w=o.useRef(-1),I=o.useRef(),k=o.useRef(-1),M=o.useRef(!0),C=o.useRef(!1),T=o.useRef((()=>{})),O=o.useCallback((()=>{var e;const n=null==(e=c.current.openEvent)?void 0:e.type;return(null==n?void 0:n.includes("mouse"))&&"mousedown"!==n}),[c]);o.useEffect((()=>{if(a)return l.on("openchange",e),()=>{l.off("openchange",e)};function e(e){let{open:n}=e;n||(clearTimeout(w.current),clearTimeout(k.current),M.current=!0)}}),[a,l]),o.useEffect((()=>{if(!a)return;if(!b.current)return;if(!t)return;function e(e){O()&&r(!1,e,"hover")}const n=(0,u.YE)(s.floating).documentElement;return n.addEventListener("mouseleave",e),()=>{n.removeEventListener("mouseleave",e)}}),[s.floating,t,r,a,b,O]);const L=o.useCallback((function(e,n,t){void 0===n&&(n=!0),void 0===t&&(t="hover");const o=ie(E.current,"close",x.current);o&&!I.current?(clearTimeout(w.current),w.current=window.setTimeout((()=>r(!1,e,t)),o)):n&&(clearTimeout(w.current),r(!1,e,t))}),[E,r]),S=p((()=>{T.current(),I.current=void 0})),F=p((()=>
1{if(C.current){const e=(0,u.YE)(s.floating).body;e.style.pointerEvents="",e.removeAttribute(ce),C.current=!1}}));o.useEffect((()=>{if(a&&(0,i.vq)(s.domReference)){var e;const n=s.domReference;return t&&n.addEventListener("mouseleave",f),null==(e=s.floating)||e.addEventListener("mouseleave",f),g&&n.addEventListener("mousemove",o,{once:!0}),n.addEventListener("mouseenter",o),n.addEventListener("mouseleave",l),()=>{var e;t&&n.removeEventListener("mouseleave",f),null==(e=s.floating)||e.removeEventListener("mouseleave",f),g&&n.removeEventListener("mousemove",o),n.removeEventListener("mouseenter",o),n.removeEventListener("mouseleave",l)}}function n(){return!!c.current.openEvent&&["click","mousedown"].includes(c.current.openEvent.type)}function o(e){if(clearTimeout(w.current),M.current=!1,v&&!(0,u.Go)(x.current)||m>0&&!ie(E.current,"open"))return;const n=ie(E.current,"open",x.current);n?w.current=window.setTimeout((()=>{R.current||r(!0,e,"hover")}),n):r(!0,e,"hover")}function l(e){if(n())return;T.current();const r=(0,u.YE)(s.floating);if(clearTimeout(k.current),b.current&&c.current.floatingContext){t||clearTimeout(w.current),I.current=b.current({...c.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){F(),S(),L(e,!0,"safe-polygon")}});const n=I.current;return r.addEventListener("mousemove",n),void(T.current=()=>{r.removeEventListener("mousemove",n)})}("touch"!==x.current||!(0,u.gR)(s.floating,e.relatedTarget))&&L(e)}function f(e){n()||c.current.floatingContext&&(null==b.current||b.current({...c.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){F(),S(),L(e)}})(e))}}),[s,a,e,v,m,g,L,S,F,r,t,R,h,E,b,c]),P((()=>{var e;if(a&&t&&null!=(e=b.current)&&e.__options.blockPointerEvents&&O()){const e=(0,u.YE)(s.floating).body;e.setAttribute(ce,""),e.style.pointerEvents="none",C.current=!0;const t=s.floating;if((0,i.vq)(s.domReference)&&t){var n;const e=s.domReference,r=null==h||null==(n=h.nodesRef.current.find((e=>e.id===y)))||null==(n=n.context)?void 0:n.elements.floating;return r&&(r.style.pointerEvents=""),e.style.pointerEvents="auto",t.style.pointerEvents="auto",()=>{e.style.pointerEvents="",t.style.pointerEvents=""}}}}),[a,t,y,s,h,b,O]),P((()=>{t||(x.current=void 0,S(),F())}),[t,S,F]),o.useEffect((()=>()=>{S(),clearTimeout(w.current),clearTimeout(k.current),F()}),[a,s.domReference,S,F]);const D=o.useMemo((()=>{function e(e){x.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:n}=e;function o(){M.current||R.current||r(!0,n,"hover")}v&&!(0,u.Go)(x.current)||t||0===m||(clearTimeout(k.current),"touch"===x.current?o():k.current=window.setTimeout(o,m))}}}),[v,r,t,R,m]),A=o.useMemo((()=>({onMouseEnter(){clearTimeout(w.current)},onMouseLeave(e){L(e.nativeEvent,!1)}})),[L]);return o.useMemo((()=>a?{reference:D,floating:A}:{}),[a,D,A])}const se=()=>{},ae=o.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:se,setState:se,isInstantPhase:!1}),fe=()=>o.useContext(ae);function de(e){const{children:n,delay:t,timeoutMs:r=0}=e,[u,c]=o.useReducer(((e,n)=>({...e,...n})),{delay:t,timeoutMs:r,initialDelay:t,currentId:null,isInstantPhase:!1}),i=o.useRef(null),l=o.useCallback((e=>{c({currentId:e})}),[]);return P((()=>{u.currentId?null===i.current?i.current=u.currentId:u.isInstantPhase||c({isInstantPhase:!0}):(u.isInstantPhase&&c({isInstantPhase:!1}),i.current=null)}),[u.currentId,u.isInstantPhase]),o.createElement(ae.Provider,{value:o.useMemo((()=>({...u,setState:c,setCurrentId:l})),[u,l])},n)}function ve(e,n){void 0===n&&(n={});const{open:t,onOpenChange:r,floatingId:o}=e,{id:u}=n,c=null!=u?u:o,i=fe(),{currentId:l,setCurrentId:s,initialDelay:a,setState:f,timeoutMs:d}=i;return P((()=>{l&&(f({delay:{open:1,close:ie(a,"close")}}),l!==c&&r(!1))}),[c,r,f,l,a]),P((()=>{function e(){r(!1),f({delay:a,currentId:null})}if(l&&!t&&l===c){if(d){const n=window.setTimeout(e,d);return()=>{clearTimeout(n)}}e()}}),[t,f,l,c,r,a,d]),P((()=>{s!==se&&t&&s(c)}),[t,s,c]),i}function me(e,n){let t=e.filter((e=>{var t;return e.parentId===n&&(null==(t=e.context)?void 0:t.open)})),r=t;for(;r.length;)r=e.filter((e=>{var n;return null==(n=r)?void 0:n.some((n=>{var t;return e.parentId===n.id&&(null==(t=e.context)?void 0:t.open)}))})),t=t.concat(r);return t}let pe=new WeakMap,ge=new WeakSet,he={},ye=0;const be=()=>"undefined"!=typeof HTMLElement&&"inert"in HTMLElement.prototype,Ee=e=>e&&(e.host||Ee(e.parentNode)),Re=(e,n)=>n.map((n=>{if(e.contains(n))return n;const t=Ee(n);return e.contains(t)?t:null})).filter((e=>null!=e));function xe(e,n,t){void 0===n&&(n=!1),void 0===t&&(t=!1);const r=(0,u.YE)(e[0]).body;return function(e,n,t,r){const o="data-floating-ui-inert",u=r?"inert":t?"aria-hidden":null,c=Re(n,e),l=new Set,s=new Set(c),a=[];he[o]||(he[o]=new WeakMap);const f=he[o];
1return c.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,i.mq)(n))if(l.has(n))e(n);else{const e=u?n.getAttribute(u):null,t=null!==e&&"false"!==e,r=(pe.get(n)||0)+1,c=(f.get(n)||0)+1;pe.set(n,r),f.set(n,c),a.push(n),1===r&&t&&ge.add(n),1===c&&n.setAttribute(o,""),!t&&u&&n.setAttribute(u,"true")}}))}(n),l.clear(),ye++,()=>{a.forEach((e=>{const n=(pe.get(e)||0)-1,t=(f.get(e)||0)-1;pe.set(e,n),f.set(e,t),n||(!ge.has(e)&&u&&e.removeAttribute(u),ge.delete(e)),t||e.removeAttribute(o)})),ye--,ye||(pe=new WeakMap,pe=new WeakMap,ge=new WeakSet,he={})}}(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,n,t)}const we=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Ie(e,n){const t=(0,l.Kr)(e,we());"prev"===n&&t.reverse();const r=t.indexOf((0,u.RS)((0,u.YE)(e)));return t.slice(r+1)[0]}function ke(){return Ie(document.body,"next")}function Me(){return Ie(document.body,"prev")}function Ce(e,n){const t=n||e.currentTarget,r=e.relatedTarget;return!r||!(0,u.gR)(t,r)}function Te(e){(0,l.Kr)(e,we()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function Oe(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const n=e.dataset.tabindex;delete e.dataset.tabindex,n?e.setAttribute("tabindex",n):e.removeAttribute("tabindex")}))}const Le={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};function Se(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const Pe=o.forwardRef((function(e,n){const[t,r]=o.useState();P((()=>((0,u.nr)()&&r("button"),document.addEventListener("keydown",Se),()=>{document.removeEventListener("keydown",Se)})),[]);const c={ref:n,tabIndex:0,role:t,"aria-hidden":!t||void 0,[oe("focus-guard")]:"",style:Le};return o.createElement("span",B({},e,c))})),Fe=o.createContext(null),De=oe("portal");function Ae(e){void 0===e&&(e={});const{id:n,root:t}=e,r=X(),u=Ke(),[c,l]=o.useState(null),s=o.useRef(null);return P((()=>()=>{null==c||c.remove(),queueMicrotask((()=>{s.current=null}))}),[c]),P((()=>{if(!r)return;if(s.current)return;const e=n?document.getElementById(n):null;if(!e)return;const t=document.createElement("div");t.id=r,t.setAttribute(De,""),e.appendChild(t),s.current=t,l(t)}),[n,r]),P((()=>{if(!r)return;if(s.current)return;let e=t||(null==u?void 0:u.portalNode);e&&!(0,i.vq)(e)&&(e=e.current),e=e||document.body;let o=null;n&&(o=document.createElement("div"),o.id=n,e.appendChild(o));const c=document.createElement("div");c.id=r,c.setAttribute(De,""),e=o||e,e.appendChild(c),s.current=c,l(c)}),[n,t,r,u]),c}function Ne(e){const{children:n,id:t,root:r=null,preserveTabOrder:u=!0}=e,c=Ae({id:t,root:r}),[i,l]=o.useState(null),a=o.useRef(null),f=o.useRef(null),d=o.useRef(null),v=o.useRef(null),m=!!i&&!i.modal&&i.open&&u&&!(!r&&!c);return o.useEffect((()=>{if(c&&u&&(null==i||!i.modal))return c.addEventListener("focusin",e,!0),c.addEventListener("focusout",e,!0),()=>{c.removeEventListener("focusin",e,!0),c.removeEventListener("focusout",e,!0)};function e(e){if(c&&Ce(e)){("focusin"===e.type?Oe:Te)(c)}}}),[c,u,null==i?void 0:i.modal]),o.createElement(Fe.Provider,{value:o.useMemo((()=>({preserveTabOrder:u,beforeOutsideRef:a,afterOutsideRef:f,beforeInsideRef:d,afterInsideRef:v,portalNode:c,setFocusManagerState:l})),[u,c])},m&&c&&o.createElement(Pe,{"data-type":"outside",ref:a,onFocus:e=>{if(Ce(e,c)){var n;null==(n=d.current)||n.focus()}else{const e=Me()||(null==i?void 0:i.refs.domReference.current);null==e||e.focus()}}}),m&&c&&o.createElement("span",{"aria-owns":c.id,style:Le}),c&&s.createPortal(n,c),m&&c&&o.createElement(Pe,{"data-type":"outside",ref:f,onFocus:e=>{if(Ce(e,c)){var n;null==(n=v.current)||n.focus()}else{const n=ke()||(null==i?void 0:i.refs.domReference.current);null==n||n.focus(),(null==i?void 0:i.closeOnFocusOut)&&(null==i||i.onOpenChange(!1,e.nativeEvent))}}}))}const Ke=()=>o.useContext(Fe),qe=20;let je=[];
1function Ye(e){je=je.filter((e=>e.isConnected));let n=e;if(n&&"body"!==(0,i.mq)(n)){if(!(0,l.AO)(n,we())){const e=(0,l.Kr)(n,we())[0];e&&(n=e)}je.push(n),je.length>qe&&(je=je.slice(-qe))}}function _e(){return je.slice().reverse().find((e=>e.isConnected))}const We=o.forwardRef((function(e,n){return o.createElement("button",B({},e,{type:"button",ref:n,tabIndex:-1,style:Le}))}));function He(e){const{context:n,children:t,disabled:r=!1,order:c=["content"],guards:s=!0,initialFocus:a=0,returnFocus:f=!0,restoreFocus:d=!1,modal:v=!0,visuallyHiddenDismiss:m=!1,closeOnFocusOut:g=!0}=e,{open:h,refs:y,nodeId:b,onOpenChange:E,events:R,dataRef:x,floatingId:w,elements:{domReference:I,floating:k}}=n,M="number"==typeof a&&a<0,C=(0,u.WZ)(I)&&M,T=!be()||s,O=ue(c),L=ue(a),F=ue(f),D=ee(),A=Ke(),N=o.useRef(null),K=o.useRef(null),q=o.useRef(!1),j=o.useRef(!1),Y=o.useRef(-1),_=null!=A,W=null==k?void 0:k.firstElementChild,H=(null==W?void 0:W.id)===w?W:k,B=p((function(e){return void 0===e&&(e=H),e?(0,l.Kr)(e,we()):[]})),z=p((e=>{const n=B(e);return O.current.map((e=>I&&"reference"===e?I:H&&"floating"===e?H:n)).filter(Boolean).flat()}));function U(e){return!r&&m&&v?o.createElement(We,{ref:"start"===e?N:K,onClick:e=>E(!1,e.nativeEvent)},"string"==typeof m?m:"Dismiss"):null}o.useEffect((()=>{if(r)return;if(!v)return;function e(e){if("Tab"===e.key){(0,u.gR)(H,(0,u.RS)((0,u.YE)(H)))&&0===B().length&&!C&&(0,u.jo)(e);const n=z(),t=(0,u.EW)(e);"reference"===O.current[0]&&t===I&&((0,u.jo)(e),e.shiftKey?S(n[n.length-1]):S(n[1])),"floating"===O.current[1]&&t===H&&e.shiftKey&&((0,u.jo)(e),S(n[0]))}}const n=(0,u.YE)(H);return n.addEventListener("keydown",e),()=>{n.removeEventListener("keydown",e)}}),[r,I,H,v,O,C,B,z]),o.useEffect((()=>{if(!r&&k)return k.addEventListener("focusin",e),()=>{k.removeEventListener("focusin",e)};function e(e){const n=(0,u.EW)(e),t=B().indexOf(n);-1!==t&&(Y.current=t)}}),[r,k,B]),o.useEffect((()=>{if(!r&&g)return k&&(0,i.sb)(I)?(I.addEventListener("focusout",n),I.addEventListener("pointerdown",e),k.addEventListener("focusout",n),()=>{I.removeEventListener("focusout",n),I.removeEventListener("pointerdown",e),k.removeEventListener("focusout",n)}):void 0;function e(){j.current=!0,setTimeout((()=>{j.current=!1}))}function n(e){const n=e.relatedTarget;queueMicrotask((()=>{const t=!((0,u.gR)(I,n)||(0,u.gR)(k,n)||(0,u.gR)(n,k)||(0,u.gR)(null==A?void 0:A.portalNode,n)||null!=n&&n.hasAttribute(oe("focus-guard"))||D&&(me(D.nodesRef.current,b).find((e=>{var t,r;return(0,u.gR)(null==(t=e.context)?void 0:t.elements.floating,n)||(0,u.gR)(null==(r=e.context)?void 0:r.elements.domReference,n)}))||function(e,n){var t;let r=[],o=null==(t=e.find((e=>e.id===n)))?void 0:t.parentId;for(;o;){const n=e.find((e=>e.id===o));o=null==n?void 0:n.parentId,n&&(r=r.concat(n))}return r}(D.nodesRef.current,b).find((e=>{var t,r;return(null==(t=e.context)?void 0:t.elements.floating)===n||(null==(r=e.context)?void 0:r.elements.domReference)===n}))));if(d&&t&&(0,u.RS)((0,u.YE)(H))===(0,u.YE)(H).body){(0,i.sb)(H)&&(null==H||H.focus());const e=Y.current,n=B(),t=n[e]||n[n.length-1]||H;(0,i.sb)(t)&&t.focus()}!C&&v||!n||!t||j.current||n===_e()||(q.current=!0,E(!1,e))}))}}),[r,I,k,H,v,b,D,A,E,g,d,B,C]),o.useEffect((()=>{var e;if(r)return;const n=Array.from((null==A||null==(e=A.portalNode)?void 0:e.querySelectorAll("["+oe("portal")+"]"))||[]);if(k){const e=[k,...n,N.current,K.current,O.current.includes("reference")||C?I:null].filter((e=>null!=e)),t=v||C?xe(e,T,!T):xe(e);return()=>{t()}}}),[r,I,k,v,O,A,C,T]),P((()=>{if(r||!(0,i.sb)(H))return;const e=(0,u.YE)(H),n=(0,u.RS)(e);queueMicrotask((()=>{const e=z(H),t=L.current,r=("number"==typeof t?e[t]:t.current)||H,o=(0,u.gR)(H,n);M||o||!h||S(r,{preventScroll:r===H})}))}),[r,h,H,M,z,L]),P((()=>{if(r||!H)return;let e=!1;const n=(0,u.YE)(H),t=(0,u.RS)(n);let o=x.current.openEvent;function c(n){let{open:t,reason:r,event:c,nested:i}=n;t&&(o=c),"escape-key"===r&&y.domReference.current&&Ye(y.domReference.current),"hover"===r&&"mouseleave"===c.type&&(q.current=!0),"outside-press"===r&&(i?(q.current=!1,e=!0):q.current=!((0,u.YF)(c)||(0,u.Pg)(c)))}return Ye(t),R.on("openchange",c),()=>{R.off("openchange",c);const t=(0,u.RS)(n),r=(0,u.gR)(k,t)||D&&me(D.nodesRef.current,b).some((e=>{var n;return(0,u.gR)(null==(n=e.context)?void 0:n.elements.floating,t)}));(r||o&&["click","mousedown"].includes(o.type))&&y.domReference.current&&Ye(y.domReference.current);const l=_e();F.current&&!q.current&&(0,i.sb)(l)&&(l===t||t===n.body||r)&&S(l,{cancelPrevious:!1,preventScroll:e})}}),[r,k,H,F,x,y,R,D,b]),P((()=>
1{if(!r&&A)return A.setFocusManagerState({modal:v,closeOnFocusOut:g,open:h,onOpenChange:E,refs:y}),()=>{A.setFocusManagerState(null)}}),[r,A,v,h,E,y,g]),P((()=>{if(r)return;if(!H)return;if("function"!=typeof MutationObserver)return;if(M)return;const e=()=>{const e=H.getAttribute("tabindex"),n=B(),t=(0,u.RS)((0,u.YE)(k)),r=n.indexOf(t);-1!==r&&(Y.current=r),O.current.includes("floating")||t!==y.domReference.current&&0===n.length?"0"!==e&&H.setAttribute("tabindex","0"):"-1"!==e&&H.setAttribute("tabindex","-1")};e();const n=new MutationObserver(e);return n.observe(H,{childList:!0,subtree:!0,attributes:!0}),()=>{n.disconnect()}}),[r,k,H,y,O,B,M]);const G=!r&&T&&(!v||!C)&&(_||v);return o.createElement(o.Fragment,null,G&&o.createElement(Pe,{"data-type":"inside",ref:null==A?void 0:A.beforeInsideRef,onFocus:e=>{if(v){const e=z();S("reference"===c[0]?e[0]:e[e.length-1])}else if(null!=A&&A.preserveTabOrder&&A.portalNode)if(q.current=!1,Ce(e,A.portalNode)){const e=ke()||I;null==e||e.focus()}else{var n;null==(n=A.beforeOutsideRef.current)||n.focus()}}}),!C&&U("start"),t,U("end"),G&&o.createElement(Pe,{"data-type":"inside",ref:null==A?void 0:A.afterInsideRef,onFocus:e=>{if(v)S(z()[0]);else if(null!=A&&A.preserveTabOrder&&A.portalNode)if(g&&(q.current=!0),Ce(e,A.portalNode)){const e=Me()||I;null==e||e.focus()}else{var n;null==(n=A.afterOutsideRef.current)||n.focus()}}}))}const Be=new Set,ze=o.forwardRef((function(e,n){const{lockScroll:t=!1,...r}=e,c=X();return P((()=>{if(!t)return;Be.add(c);const e=/iP(hone|ad|od)|iOS/.test((0,u.uo)()),n=document.body.style,r=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth,i=n.left?parseFloat(n.left):window.scrollX,l=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",o&&(n[r]=o+"px"),e){var s,a;const e=(null==(s=window.visualViewport)?void 0:s.offsetLeft)||0,t=(null==(a=window.visualViewport)?void 0:a.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(l-Math.floor(t))+"px",left:-(i-Math.floor(e))+"px",right:"0"})}return()=>{Be.delete(c),0===Be.size&&(Object.assign(n,{overflow:"",[r]:""}),e&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(i,l)))}}),[c,t]),o.createElement("div",B({ref:n},r,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...r.style}}))}));function Ue(e){return(0,i.sb)(e.target)&&"BUTTON"===e.target.tagName}function Ge(e){return(0,u.$u)(e)}function Xe(e,n){void 0===n&&(n={});const{open:t,onOpenChange:r,dataRef:c,elements:{domReference:i}}=e,{enabled:l=!0,event:s="click",toggle:a=!0,ignoreMouse:f=!1,keyboardHandlers:d=!0}=n,v=o.useRef(),m=o.useRef(!1),p=o.useMemo((()=>({onPointerDown(e){v.current=e.pointerType},onMouseDown(e){const n=v.current;0===e.button&&"click"!==s&&((0,u.Go)(n,!0)&&f||(!t||!a||c.current.openEvent&&"mousedown"!==c.current.openEvent.type?(e.preventDefault(),r(!0,e.nativeEvent,"click")):r(!1,e.nativeEvent,"click")))},onClick(e){const n=v.current;"mousedown"===s&&v.current?v.current=void 0:(0,u.Go)(n,!0)&&f||(!t||!a||c.current.openEvent&&"click"!==c.current.openEvent.type?r(!0,e.nativeEvent,"click"):r(!1,e.nativeEvent,"click"))},onKeyDown(e){v.current=void 0,e.defaultPrevented||!d||Ue(e)||(" "!==e.key||Ge(i)||(e.preventDefault(),m.current=!0),"Enter"===e.key&&r(!t||!a,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!d||Ue(e)||Ge(i)||" "===e.key&&m.current&&(m.current=!1,r(!t||!a,e.nativeEvent,"click"))}})),[c,i,s,f,d,r,t,a]);return o.useMemo((()=>l?{reference:p}:{}),[l,p])}function Ve(e){return null!=e&&null!=e.clientX}function Ze(e,n){void 0===n&&(n={});const{open:t,dataRef:r,elements:{floating:c,domReference:l},refs:s}=e,{enabled:a=!0,axis:f="both",x:d=null,y:v=null}=n,m=o.useRef(!1),g=o.useRef(null),[h,y]=o.useState(),[b,E]=o.useState([]),R=p(((e,n)=>{m.current||r.current.openEvent&&!Ve(r.current.openEvent)||s.setPositionReference(function(e,n){let t=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var u;const c=(null==e?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},i="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=c.width,f=c.height,d=c.x,v=c.y;return null==t&&n.x&&i&&(t=c.x-n.x),null==r&&n.y&&l&&(r=c.y-n.y),d-=t||0,v-=r||0,a=0,f=0,!o||s?(a="y"===n.axis?c.width:0,f="x"===n.axis?c.height:0,d=i&&null!=n.x?n.x:d,v=l&&null!=n.y?n.y:v):o&&!s&&(f="x"===n.axis?c.height:f,a="y"===n.axis?c.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:h}))})),x=p((e=>{null==d&&null==v&&(t?g.current||E([]):R(e.clientX,e.clientY))})),w=(0,u.Go)(h)?c:t,I=o.useCallback((()=>
1{if(!w||!a||null!=d||null!=v)return;const e=(0,i.zk)(c);function n(t){const r=(0,u.EW)(t);(0,u.gR)(c,r)?(e.removeEventListener("mousemove",n),g.current=null):R(t.clientX,t.clientY)}if(!r.current.openEvent||Ve(r.current.openEvent)){e.addEventListener("mousemove",n);const t=()=>{e.removeEventListener("mousemove",n),g.current=null};return g.current=t,t}s.setPositionReference(l)}),[w,a,d,v,c,r,s,l,R]);o.useEffect((()=>I()),[I,b]),o.useEffect((()=>{a&&!c&&(m.current=!1)}),[a,c]),o.useEffect((()=>{!a&&t&&(m.current=!0)}),[a,t]),P((()=>{!a||null==d&&null==v||(m.current=!1,R(d,v))}),[a,d,v,R]);const k=o.useMemo((()=>{function e(e){let{pointerType:n}=e;y(n)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:x,onMouseEnter:x}}),[x]);return o.useMemo((()=>a?{reference:k}:{}),[a,k])}const $e={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Qe={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Je=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 en(e,n){void 0===n&&(n={});const{open:t,onOpenChange:r,elements:c,dataRef:l}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:f=!0,outsidePressEvent:d="pointerdown",referencePress:v=!1,referencePressEvent:m="pointerdown",ancestorScroll:g=!1,bubbles:h,capture:y}=n,b=ee(),E=p("function"==typeof f?f:()=>!1),R="function"==typeof f?E:f,x=o.useRef(!1),w=o.useRef(!1),{escapeKey:I,outsidePress:k}=Je(h),{escapeKey:M,outsidePress:C}=Je(y),T=p((e=>{var n;if(!t||!s||!a||"Escape"!==e.key)return;const o=null==(n=l.current.floatingContext)?void 0:n.nodeId,c=b?me(b.nodesRef.current,o):[];if(!I&&(e.stopPropagation(),c.length>0)){let e=!0;if(c.forEach((n=>{var t;null==(t=n.context)||!t.open||n.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,(0,u.O_)(e)?e.nativeEvent:e,"escape-key")})),O=p((e=>{var n;const t=()=>{var n;T(e),null==(n=(0,u.EW)(e))||n.removeEventListener("keydown",t)};null==(n=(0,u.EW)(e))||n.addEventListener("keydown",t)})),L=p((e=>{var n;const t=x.current;x.current=!1;const o=w.current;if(w.current=!1,"click"===d&&o)return;if(t)return;if("function"==typeof R&&!R(e))return;const s=(0,u.EW)(e),a="["+oe("inert")+"]",f=(0,u.YE)(c.floating).querySelectorAll(a);let v=(0,i.vq)(s)?s:null;for(;v&&!(0,i.eu)(v);){const e=(0,i.$4)(v);if((0,i.eu)(e)||!(0,i.vq)(e))break;v=e}if(f.length&&(0,i.vq)(s)&&!(0,u.tZ)(s)&&!(0,u.gR)(s,c.floating)&&Array.from(f).every((e=>!(0,u.gR)(v,e))))return;if((0,i.sb)(s)&&F){const n=s.clientWidth>0&&s.scrollWidth>s.clientWidth,t=s.clientHeight>0&&s.scrollHeight>s.clientHeight;let r=t&&e.offsetX>s.clientWidth;if(t){"rtl"===(0,i.L9)(s).direction&&(r=e.offsetX<=s.offsetWidth-s.clientWidth)}if(r||n&&e.offsetY>s.clientHeight)return}const m=null==(n=l.current.floatingContext)?void 0:n.nodeId,p=b&&me(b.nodesRef.current,m).some((n=>{var t;return(0,u.F2)(e,null==(t=n.context)?void 0:t.elements.floating)}));if((0,u.F2)(e,c.floating)||(0,u.F2)(e,c.domReference)||p)return;const g=b?me(b.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")})),S=p((e=>{var n;const t=()=>{var n;L(e),null==(n=(0,u.EW)(e))||n.removeEventListener(d,t)};null==(n=(0,u.EW)(e))||n.addEventListener(d,t)}));o.useEffect((()=>{if(!t||!s)return;function e(e){r(!1,e,"ancestor-scroll")}l.current.__escapeKeyBubbles=I,l.current.__outsidePressBubbles=k;const n=(0,u.YE)(c.floating);a&&n.addEventListener("keydown",M?O:T,M),R&&n.addEventListener(d,C?S:L,C);let o=[];return g&&((0,i.vq)(c.domReference)&&(o=(0,i.v9)(c.domReference)),(0,i.vq)(c.floating)&&(o=o.concat((0,i.v9)(c.floating))),!(0,i.vq)(c.reference)&&c.reference&&c.reference.contextElement&&(o=o.concat((0,i.v9)(c.reference.contextElement)))),o=o.filter((e=>{var t;return e!==(null==(t=n.defaultView)?void 0:t.visualViewport)})),o.forEach((n=>{n.addEventListener("scroll",e,{passive:!0})})),()=>{a&&n.removeEventListener("keydown",M?O:T,M),R&&n.removeEventListener(d,C?S:L,C),o.forEach((n=>{n.removeEventListener("scroll",e)}))}}),[l,c,a,R,d,t,r,g,s,I,k,T,M,O,L,C,S]),o.useEffect((()=>{x.current=!1}),[R,d]);const P=o.useMemo((()=>({onKeyDown:T,[$e[m]]:e=>{v&&r(!1,e.nativeEvent,"reference-press")}})),[T,r,v,m]),F=o.useMemo((()=>({onKeyDown:T,onMouseDown(){w.current=!0},onMouseUp(){w.current=!0},[Qe[d]]:()=>{x.current=!0}})),[T,d]);return o.useMemo((()=>s?{reference:P,floating:F}:{}),[s,P,F])}function nn(e){const{open:n=!1,onOpenChange:t,elements:r}=e,u=X(),c=o.useRef({}),[i]=o.useState((()=>Z())),l=null!=J();
1const[s,a]=o.useState(r.reference),f=p(((e,n,r)=>{c.current.openEvent=e?n:void 0,i.emit("openchange",{open:e,event:n,reason:r,nested:l}),null==t||t(e,n,r)})),d=o.useMemo((()=>({setPositionReference:a})),[]),v=o.useMemo((()=>({reference:s||r.reference||null,floating:r.floating||null,domReference:r.reference})),[s,r.reference,r.floating]);return o.useMemo((()=>({dataRef:c,open:n,onOpenChange:f,elements:v,events:i,floatingId:u,refs:d})),[n,f,v,i,u,d])}function tn(e){void 0===e&&(e={});const{nodeId:n}=e,t=nn({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||t,u=r.elements,[c,l]=o.useState(null),[s,f]=o.useState(null),d=(null==u?void 0:u.reference)||c,v=o.useRef(null),m=ee();P((()=>{d&&(v.current=d)}),[d]);const p=(0,a.we)({...e,elements:{...u,...s&&{reference:s}}}),g=o.useCallback((e=>{const n=(0,i.vq)(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;f(n),p.refs.setReference(n)}),[p.refs]),h=o.useCallback((e=>{((0,i.vq)(e)||null===e)&&(v.current=e,l(e)),((0,i.vq)(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!(0,i.vq)(e))&&p.refs.setReference(e)}),[p.refs]),y=o.useMemo((()=>({...p.refs,setReference:h,setPositionReference:g,domReference:v})),[p.refs,h,g]),b=o.useMemo((()=>({...p.elements,domReference:d})),[p.elements,d]),E=o.useMemo((()=>({...p,...r,refs:y,elements:b,nodeId:n})),[p,y,b,n,r]);return P((()=>{r.dataRef.current.floatingContext=E;const e=null==m?void 0:m.nodesRef.current.find((e=>e.id===n));e&&(e.context=E)})),o.useMemo((()=>({...p,context:E,refs:y,elements:b})),[p,y,b,E])}function rn(e,n){void 0===n&&(n={});const{open:t,onOpenChange:r,events:c,dataRef:l,elements:s}=e,{enabled:a=!0,visibleOnly:f=!0}=n,d=o.useRef(!1),v=o.useRef(),m=o.useRef(!0);o.useEffect((()=>{if(!a)return;const e=(0,i.zk)(s.domReference);function n(){!t&&(0,i.sb)(s.domReference)&&s.domReference===(0,u.RS)((0,u.YE)(s.domReference))&&(d.current=!0)}function r(){m.current=!0}return e.addEventListener("blur",n),e.addEventListener("keydown",r,!0),()=>{e.removeEventListener("blur",n),e.removeEventListener("keydown",r,!0)}}),[s.domReference,t,a]),o.useEffect((()=>{if(a)return c.on("openchange",e),()=>{c.off("openchange",e)};function e(e){let{reason:n}=e;"reference-press"!==n&&"escape-key"!==n||(d.current=!0)}}),[c,a]),o.useEffect((()=>()=>{clearTimeout(v.current)}),[]);const p=o.useMemo((()=>({onPointerDown(e){(0,u.Pg)(e.nativeEvent)||(m.current=!1)},onMouseLeave(){d.current=!1},onFocus(e){if(d.current)return;const n=(0,u.EW)(e.nativeEvent);if(f&&(0,i.vq)(n))try{if((0,u.nr)()&&(0,u.cX)())throw Error();if(!n.matches(":focus-visible"))return}catch(t){if(!m.current&&!(0,u.$u)(n))return}r(!0,e.nativeEvent,"focus")},onBlur(e){d.current=!1;const n=e.relatedTarget,t=e.nativeEvent,o=(0,i.vq)(n)&&n.hasAttribute(oe("focus-guard"))&&"outside"===n.getAttribute("data-type");v.current=window.setTimeout((()=>{var e;const c=(0,u.RS)(s.domReference?s.domReference.ownerDocument:document);(n||c!==s.domReference)&&((0,u.gR)(null==(e=l.current.floatingContext)?void 0:e.refs.floating.current,c)||(0,u.gR)(s.domReference,c)||o||r(!1,t,"focus"))}))}})),[l,s.domReference,r,f]);return o.useMemo((()=>a?{reference:p}:{}),[a,p])}const on="active",un="selected";function cn(e,n,t){const r=new Map,o="item"===t;let u=e;if(o&&e){const{[on]:n,[un]:t,...r}=e;u=r}return{..."floating"===t&&{tabIndex:-1},...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 c;o&&[on,un].includes(t)||(0===t.indexOf("on")?(r.has(t)||r.set(t,[]),"function"==typeof u&&(null==(c=r.get(t))||c.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 ln(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=>cn(n,e,"reference")),n),c=o.useCallback((n=>cn(n,e,"floating")),t),i=o.useCallback((n=>cn(n,e,"item")),r);return o.useMemo((()=>({getReferenceProps:u,getFloatingProps:c,getItemProps:i})),[u,c,i])}let sn=!1;function an(e,n,t){switch(e){case"vertical":return n;case"horizontal":return t;default:return n||t}}function fn(e,n){return an(n,e===g||e===h,e===y||e===b)}function dn(e,n,t){return an(n,e===h,t?e===y:e===b)||"Enter"===e||" "===e||""===e}function vn(e,n,t){return an(n,t?e===b:e===y,e===g)}function mn(e,n){const{open:t,onOpenChange:r,elements:c}=e,{listRef:l,activeIndex:s,onNavigate:a=()=>{},enabled:f=!0,selectedIndex:d=null,allowEscape:v=!1,loop:m=!1,nested:g=!1,rtl:E=!1,virtual:L=!1,focusItemOnOpen:F="auto",focusItemOnHover:D=!0,openOnArrowKeyDown:A=!0,disabledIndices:N,orientation:K="vertical",cols:q=1,scrollItemIntoView:j=!0,virtualItemRef:Y,itemSizes:_,dense:W=!1}=n;const H=J(),B=ee(),z=p(a),U=o.useRef(F),G=o.useRef(null!=d?d:-1),X=o.useRef(null),V=o.useRef(!0),Z=o.useRef(z),$=o.useRef(!!c.floating),Q=o.useRef(!1),ne=o.useRef(!1),te=ue(N),re=ue(t),oe=ue(j),ce=ue(c.floating),ie=ue(d),[le,se]=o.useState(),[ae,fe]=o.useState(),de=p((function(e,n,t){function r(e){L?(se(e.id),null==B||B.events.emit("virtualfocus",e),Y&&(Y.current=e)):S(e,{preventScroll:!0,sync:!(!(0,u.cX)()||!(0,u.nr)())&&(sn||Q.current)})}void 0===t&&(t=!1);const o=e.current[n.current];o&&r(o),requestAnimationFrame((()=>{const u=e.current[n.current]||o;if(!u)return;o||r(u);const c=oe.current;c&&pe&&(t||!V.current)&&(null==u.scrollIntoView||u.scrollIntoView("boolean"==typeof c?{block:"nearest",inline:"nearest"}:c))}))}));P((()=>{document.createElement("div").focus({get preventScroll(){return sn=!0,!1}})}),[]),P((()=>{f&&(t&&c.floating?U.current&&null!=d&&(ne.current=!0,G.current=d,z(d)):$.current&&(G.current=-1,Z.current(null)))}),[f,t,c.floating,d,z]),P((()=>
1{if(f&&t&&c.floating)if(null==s){if(Q.current=!1,null!=ie.current)return;if($.current&&(G.current=-1,de(l,G)),!$.current&&U.current&&(null!=X.current||!0===U.current&&null==X.current)){let e=0;const n=()=>{if(null==l.current[0]){if(e<2){(e?requestAnimationFrame:queueMicrotask)(n)}e++}else G.current=null==X.current||dn(X.current,K,E)||g?x(l,te.current):w(l,te.current),X.current=null,z(G.current)};n()}}else R(l,s)||(G.current=s,de(l,G,ne.current),ne.current=!1)}),[f,t,c.floating,s,ie,g,l,K,E,z,de,te]),P((()=>{var e;if(!f||c.floating||!B||L||!$.current)return;const n=B.nodesRef.current,t=null==(e=n.find((e=>e.id===H)))||null==(e=e.context)?void 0:e.elements.floating,r=(0,u.RS)((0,u.YE)(c.floating)),o=n.some((e=>e.context&&(0,u.gR)(e.context.elements.floating,r)));t&&!o&&V.current&&t.focus({preventScroll:!0})}),[f,c.floating,B,H,L]),P((()=>{if(f&&B&&L&&!H)return B.events.on("virtualfocus",e),()=>{B.events.off("virtualfocus",e)};function e(e){fe(e.id),Y&&(Y.current=e)}}),[f,B,L,H,Y]),P((()=>{Z.current=z,$.current=!!c.floating})),P((()=>{t||(X.current=null)}),[t]);const ve=null!=s,pe=o.useMemo((()=>{function e(e){if(!t)return;const n=l.current.indexOf(e);-1!==n&&z(n)}return{onFocus(n){let{currentTarget:t}=n;e(t)},onClick:e=>{let{currentTarget:n}=e;return n.focus({preventScroll:!0})},...D&&{onMouseMove(n){let{currentTarget:t}=n;e(t)},onPointerLeave(e){let{pointerType:n}=e;V.current&&"touch"!==n&&(G.current=-1,de(l,G),z(null),L||S(ce.current,{preventScroll:!0}))}}}}),[t,ce,de,D,l,z,L]),ge=p((e=>{if(V.current=!1,Q.current=!0,!re.current&&e.currentTarget===ce.current)return;if(g&&vn(e.key,K,E))return(0,u.jo)(e),r(!1,e.nativeEvent,"list-navigation"),void((0,i.sb)(c.domReference)&&!L&&c.domReference.focus());const n=G.current,o=x(l,N),s=w(l,N);if("Home"===e.key&&((0,u.jo)(e),G.current=o,z(G.current)),"End"===e.key&&((0,u.jo)(e),G.current=s,z(G.current)),q>1){const n=_||Array.from({length:l.current.length},(()=>({width:1,height:1}))),t=M(n,q,W),r=t.findIndex((e=>null!=e&&!O(l.current,e,N))),u=t.reduce(((e,n,t)=>null==n||O(l.current,n,N)?e:t),-1);if(G.current=t[k({current:t.map((e=>null!=e?l.current[e]:null))},{event:e,orientation:K,loop:m,cols:q,disabledIndices:T([...N||l.current.map(((e,n)=>O(l.current,n)?n:void 0)),void 0],t),minIndex:r,maxIndex:u,prevIndex:C(G.current>s?o:G.current,n,t,q,e.key===h?"bl":e.key===b?"tr":"tl"),stopEvent:!0})],z(G.current),"both"===K)return}if(fn(e.key,K)){if((0,u.jo)(e),t&&!L&&(0,u.RS)(e.currentTarget.ownerDocument)===e.currentTarget)return G.current=dn(e.key,K,E)?o:s,void z(G.current);dn(e.key,K,E)?G.current=m?n>=s?v&&n!==l.current.length?-1:o:I(l,{startingIndex:n,disabledIndices:N}):Math.min(s,I(l,{startingIndex:n,disabledIndices:N})):G.current=m?n<=o?v&&-1!==n?l.current.length:s:I(l,{startingIndex:n,decrement:!0,disabledIndices:N}):Math.max(o,I(l,{startingIndex:n,decrement:!0,disabledIndices:N})),R(l,G.current)?z(null):z(G.current)}})),he=o.useMemo((()=>L&&t&&ve&&{"aria-activedescendant":ae||le}),[L,t,ve,ae,le]),ye=o.useMemo((()=>({"aria-orientation":"both"===K?void 0:K,...!(0,u.WZ)(c.domReference)&&he,onKeyDown:ge,onPointerMove(){V.current=!0}})),[he,ge,c.domReference,K]),be=o.useMemo((()=>{const e=te.current,n=l.current.find((e=>(null==e?void 0:e.id)===le));function o(e){"auto"===F&&(0,u.YF)(e.nativeEvent)&&(U.current=!0)}return{...he,onKeyDown(o){V.current=!1;const c=0===o.key.indexOf("Arrow"),i=function(e,n,t){return an(n,t?e===y:e===b,e===h)}(o.key,K,E),s=vn(o.key,K,E),a=fn(o.key,K),f=(g?i:a)||"Enter"===o.key||""===o.key.trim();if(L&&t){const e=null==B?void 0:B.nodesRef.current.find((e=>null==e.parentId)),t=B&&e?function(e,n){let t,r=-1;return function n(o,u){u>r&&(t=o,r=u),me(e,o).forEach((e=>{n(e.id,u+1)}))}(n,0),e.find((e=>e.id===t))}(B.nodesRef.current,e.id):null;if(c&&t&&Y){const e=new KeyboardEvent("keydown",{key:o.key,bubbles:!0});if(i||s){var v,m;const r=(null==(v=t.context)?void 0:v.elements.domReference)===o.currentTarget,c=s&&!r?null==(m=t.context)?void 0:m.elements.domReference:i?n:null;c&&((0,u.jo)(o),c.dispatchEvent(e),fe(void 0))}var p;if(a&&t.context)if(t.context.open&&t.parentId&&o.currentTarget!==t.context.elements.domReference)return(0,u.jo)(o),void(null==(p=t.context.elements.domReference)||p.dispatchEvent(e))}return ge(o)}(t||A||!c)&&(f&&(X.current=g&&a?null:o.key),g?i&&((0,u.jo)(o),t?(G.current=x(l,e),z(G.current)):r(!0,o.nativeEvent,"list-navigation")):a&&(null!=d&&(G.current=d),(0,u.jo)(o),!t&&A?r(!0,o.nativeEvent,"list-navigation"):ge(o),t&&z(G.current)))},onFocus(){t&&!L&&z(null)},onPointerDown:function(e){U.current=F,"auto"===F&&(0,u.Pg)(e.nativeEvent)&&(U.current=!0)},onMouseDown:o,onClick:o}}),[le,he,ge,te,F,l,g,z,r,t,A,K,E,d,B,L,Y]);return o.useMemo((()=>f?{reference:be,floating:ye,item:pe}:{}),[f,be,ye,pe])}const pn=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function gn(e,n){var t;void 0===n&&(n={});const{open:r,floatingId:u}=e,{enabled:c=!0,role:i="dialog"}=n,l=null!=(t=pn.get(i))?t:i,s=X(),a=null!=J(),f=o.useMemo((()=>"tooltip"===l||"label"===i?{["aria-"+("label"===i?"labelledby":"describedby")]:r?u:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":"alertdialog"===l?"dialog":l,"aria-controls":r?u:void 0,..."listbox"===l&&{role:"combobox"},..."menu"===l&&{id:s},..."menu"===l&&a&&{role:"menuitem"},..."select"===i&&{"aria-autocomplete":"none"},..."combobox"===i&&{"aria-autocomplete":"list"}}),[l,u,a,r,s,i]),d=o.useMemo((()=>{const e={id:u,...l&&{role:l}};return"tooltip"===l||"label"===i?e:{...e,..."menu"===l&&{"aria-labelledby":s}}}),[l,u,s,i]),v=o.useCallback((e=>{let{active:n,selected:t}=e;const r={role:"option",...n&&{id:u+"-option"}};switch(i){case"select":return{...r,"aria-selected":n&&t};case"combobox":return{...r,...n&&{"aria-selected":!0}}}return{}}),[u,i]);return o.useMemo((()=>c?{reference:f,floating:d,item:v}:{}),[c,f,d,v])}const hn=e=>
1e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((e,n)=>(n?"-":"")+e.toLowerCase()));function yn(e,n){return"function"==typeof e?e(n):e}function bn(e,n){void 0===n&&(n={});const{open:t,elements:{floating:r}}=e,{duration:u=250}=n,c=("number"==typeof u?u:u.close)||0,[i,l]=o.useState("unmounted"),s=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 s||"close"!==i||l("unmounted"),P((()=>{if(r){if(t){l("initial");const e=requestAnimationFrame((()=>{l("open")}));return()=>{cancelAnimationFrame(e)}}l("close")}}),[t,r]),{isMounted:s,status:i}}function En(e,n){void 0===n&&(n={});const{initial:t={opacity:0},open:r,close:u,common:c,duration:i=250}=n,l=e.placement,s=l.split("-")[0],a=o.useMemo((()=>({side:s,placement:l})),[s,l]),f="number"==typeof i,d=(f?i:i.open)||0,v=(f?i:i.close)||0,[m,p]=o.useState((()=>({...yn(c,a),...yn(t,a)}))),{isMounted:g,status:h}=bn(e,{duration:i}),y=ue(t),b=ue(r),E=ue(u),R=ue(c);return P((()=>{const e=yn(y.current,a),n=yn(E.current,a),t=yn(R.current,a),r=yn(b.current,a)||Object.keys(e).reduce(((e,n)=>(e[n]="",e)),{});if("initial"===h&&p((n=>({transitionProperty:n.transitionProperty,...t,...e}))),"open"===h&&p({transitionProperty:Object.keys(r).map(hn).join(","),transitionDuration:d+"ms",...t,...r}),"close"===h){const r=n||e;p({transitionProperty:Object.keys(r).map(hn).join(","),transitionDuration:v+"ms",...t,...r})}}),[v,E,y,b,R,d,h,a]),{isMounted:g,styles:m}}function Rn(e,n){var t;const{open:r,dataRef:c}=e,{listRef:i,activeIndex:l,onMatch:s,onTypingChange:a,enabled:f=!0,findMatch:d=null,resetMs:v=750,ignoreKeys:m=[],selectedIndex:g=null}=n,h=o.useRef(),y=o.useRef(""),b=o.useRef(null!=(t=null!=g?g:l)?t:-1),E=o.useRef(null),R=p(s),x=p(a),w=ue(d),I=ue(m);P((()=>{r&&(clearTimeout(h.current),E.current=null,y.current="")}),[r]),P((()=>{var e;r&&""===y.current&&(b.current=null!=(e=null!=g?g:l)?e:-1)}),[r,g,l]);const k=p((e=>{e?c.current.typing||(c.current.typing=e,x(e)):c.current.typing&&(c.current.typing=e,x(e))})),M=p((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=i.current;if(y.current.length>0&&" "!==y.current[0]&&(-1===n(t,t,y.current)?k(!1):" "===e.key&&(0,u.jo)(e)),null==t||I.current.includes(e.key)||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;r&&" "!==e.key&&((0,u.jo)(e),k(!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())}))&&y.current===e.key&&(y.current="",b.current=E.current),y.current+=e.key,clearTimeout(h.current),h.current=setTimeout((()=>{y.current="",b.current=E.current,k(!1)}),v);const o=b.current,c=n(t,[...t.slice((o||0)+1),...t.slice(0,(o||0)+1)],y.current);-1!==c?(R(c),E.current=c):" "!==e.key&&(y.current="",k(!1))})),C=o.useMemo((()=>({onKeyDown:M})),[M]),T=o.useMemo((()=>({onKeyDown:M,onKeyUp(e){" "===e.key&&k(!1)}})),[M,k]);return o.useMemo((()=>f?{reference:C,floating:T}:{}),[f,C,T])}function xn(e,n){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:n}}}}const wn=e=>({name:"inner",options:e,async fn(n){const{listRef:t,overflowRef:r,onFallbackChange:o,offset:u=0,index:i=0,minItemsVisible:l=4,referenceOverflowThreshold:d=0,scrollRef:v,...m}=(0,c._3)(e,n),{rects:p,elements:{floating:g}}=n,h=t.current[i];if(!h)return{};const y={...n,...await(0,a.cY)(-h.offsetTop-g.clientTop-p.reference.height/2-h.offsetHeight/2-u).fn(n)},b=(null==v?void 0:v.current)||g,E=await(0,f.__)(xn(y,b.scrollHeight),m),R=await(0,f.__)(y,{...m,elementContext:"reference"}),x=Math.max(0,E.top),w=y.y+x,I=Math.max(0,b.scrollHeight-x-Math.max(0,E.bottom));return b.style.maxHeight=I+"px",b.scrollTop=x,o&&(b.offsetHeight<h.offsetHeight*Math.min(l,t.current.length-1)-1||R.top>=-d||R.bottom>=-d?s.flushSync((()=>o(!0))):s.flushSync((()=>o(!1)))),r&&(r.current=await(0,f.__)(xn({...y,y:w},b.offsetHeight),m)),{y:w}}});function In(e,n){const{open:t,elements:r}=e,{enabled:c=!0,overflowRef:i,scrollRef:l,onChange:a}=n,f=p(a),d=o.useRef(!1),v=o.useRef(null),m=o.useRef(null);o.useEffect((()=>
1{if(!c)return;function e(e){if(e.ctrlKey||!n||null==i.current)return;const t=e.deltaY,r=i.current.top>=-.5,o=i.current.bottom>=-.5,c=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,c*l)))}))):/firefox/i.test((0,u.$t)())&&(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!=i.current&&(m.current={...i.current})})),()=>{v.current=null,m.current=null,n.removeEventListener("wheel",e)}):void 0}),[c,t,r.floating,i,l,f]);const g=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(i.current&&e&&d.current){if(null!==v.current){const n=e.scrollTop-v.current;(i.current.bottom<-.5&&n<-1||i.current.top<-.5&&n>1)&&s.flushSync((()=>f((e=>e+n))))}requestAnimationFrame((()=>{v.current=e.scrollTop}))}}})),[r.floating,f,i,l]);return o.useMemo((()=>c?{floating:g}:{}),[c,g])}function kn(e,n){const[t,r]=e;let o=!1;const u=n.length;for(let c=0,i=u-1;c<u;i=c++){const[e,u]=n[c]||[0,0],[l,s]=n[i]||[0,0];u>=r!=s>=r&&t<=(l-e)*(r-u)/(s-u)+e&&(o=!o)}return o}function Mn(e){void 0===e&&(e={});const{buffer:n=.5,blockPointerEvents:t=!1,requireIntent:r=!0}=e;let o,c=!1,l=null,s=null,a=performance.now();const f=e=>{let{x:t,y:f,placement:d,elements:v,onClose:m,nodeId:p,tree:g}=e;return function(e){function h(){clearTimeout(o),m()}if(clearTimeout(o),!v.domReference||!v.floating||null==d||null==t||null==f)return;const{clientX:y,clientY:b}=e,E=[y,b],R=(0,u.EW)(e),x="mouseleave"===e.type,w=(0,u.gR)(v.floating,R),I=(0,u.gR)(v.domReference,R),k=v.domReference.getBoundingClientRect(),M=v.floating.getBoundingClientRect(),C=d.split("-")[0],T=t>M.right-M.width/2,O=f>M.bottom-M.height/2,L=function(e,n){return e[0]>=n.x&&e[0]<=n.x+n.width&&e[1]>=n.y&&e[1]<=n.y+n.height}(E,k),S=M.width>k.width,P=M.height>k.height,F=(S?k:M).left,D=(S?k:M).right,A=(P?k:M).top,N=(P?k:M).bottom;if(w&&(c=!0,!x))return;if(I&&(c=!1),I&&!x)return void(c=!0);if(x&&(0,i.vq)(e.relatedTarget)&&(0,u.gR)(v.floating,e.relatedTarget))return;if(g&&me(g.nodesRef.current,p).some((e=>{let{context:n}=e;return null==n?void 0:n.open})))return;if("top"===C&&f>=k.bottom-1||"bottom"===C&&f<=k.top+1||"left"===C&&t>=k.right-1||"right"===C&&t<=k.left+1)return h();let K=[];switch(C){case"top":K=[[F,k.top+1],[F,M.bottom-1],[D,M.bottom-1],[D,k.top+1]];break;case"bottom":K=[[F,M.top+1],[F,k.bottom-1],[D,k.bottom-1],[D,M.top+1]];break;case"left":K=[[M.right-1,N],[M.right-1,A],[k.left+1,A],[k.left+1,N]];break;case"right":K=[[k.right-1,N],[k.right-1,A],[M.left+1,A],[M.left+1,N]]}if(!kn([y,b],K)){if(c&&!L)return h();if(!x&&r){const n=function(e,n){const t=performance.now(),r=t-a;if(null===l||null===s||0===r)return l=e,s=n,a=t,null;const o=e-l,u=n-s,c=Math.sqrt(o*o+u*u);return l=e,s=n,a=t,c/r}(e.clientX,e.clientY);if(null!==n&&n<.1)return h()}kn([y,b],function(e){let[t,r]=e;switch(C){case"top":return[[S?t+n/2:T?t+4*n:t-4*n,r+n+1],[S?t-n/2:T?t+4*n:t-4*n,r+n+1],...[[M.left,T||S?M.bottom-n:M.top],[M.right,T?S?M.bottom-n:M.top:M.bottom-n]]];case"bottom":return[[S?t+n/2:T?t+4*n:t-4*n,r-n],[S?t-n/2:T?t+4*n:t-4*n,r-n],...[[M.left,T||S?M.top+n:M.bottom],[M.right,T?S?M.top+n:M.bottom:M.top+n]]];case"left":{const e=[t+n+1,P?r+n/2:O?r+4*n:r-4*n],o=[t+n+1,P?r-n/2:O?r+4*n:r-4*n];return[...[[O||P?M.right-n:M.left,M.top],[O?P?M.right-n:M.left:M.right-n,M.bottom]],e,o]}case"right":return[[t-n,P?r+n/2:O?r+4*n:r-4*n],[t-n,P?r-n/2:O?r+4*n:r-4*n],...[[O||P?M.left+n:M.right,M.top],[O?P?M.left+n:M.right:M.left+n,M.bottom]]]}}([t,f]))?!c&&r&&(o=window.setTimeout(h,40)):h()}}};return f.__options={blockPointerEvents:t},f}}}]);

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.