1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b0a3ccd4-5d62-58c1-9387-2025ed43e978")}catch(e){}}(); 3import{B as e,G as t}from"./jsx-runtime-BBg2aEpo.js";import{An as n,Bt as r,Fn as i,Ht as a,Jn as o,Lt as s,Nt as c,Pt as l,Ut as u,Vt as d,Xn as f,Zn as p,cn as m,en as h,ft as g,in as _,nn as v,zt as y}from"./useOpenInteractionType-_eX71wy0.js";var b=t(e(),1),x=v&&h;function S(e,t={}){let{enabled:h=!0,delay:v}=t,S=`rootStore`in e?e.rootStore:e,{events:C,dataRef:w}=S.context,T=b.useRef(!1),E=b.useRef(null),D=b.useRef(!0),O=_();b.useEffect(()=>{let e=S.select(`domReferenceElement`);if(!h)return;let t=o(e);function n(){let e=S.select(`domReferenceElement`);!S.select(`open`)&&p(e)&&e===d(i(e))&&(T.current=!0)}function r(){D.current=!0}function a(){D.current=!1}return c(l(t,`blur`,n),x&&l(t,`keydown`,r,!0),x&&l(t,`pointerdown`,a,!0))},[S,h]),b.useEffect(()=>{if(!h)return;function e(e){if(e.reason===`trigger-press`||e.reason===`escape-key`){let e=S.select(`domReferenceElement`);f(e)&&(E.current=e,T.current=!0)}}return C.on(`openchange`,e),()=>{C.off(`openchange`,e)}},[C,h,S]);let k=b.useMemo(()=>{function e(){T.current=!1,E.current=null}return{onMouseLeave(){e()},onFocus(t){let i=t.currentTarget;if(T.current){if(E.current===i)return;e()}let a=u(t.nativeEvent);if(f(a)){if(x&&!t.relatedTarget){if(!D.current&&!y(a))return}else if(!r(a))return}let o=s(t.relatedTarget,S.context.triggerElements),{nativeEvent:c,currentTarget:l}=t,d=typeof v==`function`?v():v;if(S.select(`open`)&&o||d===0||d===void 0){S.setOpen(!0,m(n,c,l));return}O.start(d,()=>{T.current||S.setOpen(!0,m(n,c,l))})},onBlur(t){e();let r=t.relatedTarget,o=t.nativeEvent,c=f(r)&&r.hasAttribute(g(`focus-guard`))&&r.getAttribute(`data-type`)===`outside`;O.start(0,()=>{let e=S.select(`domReferenceElement`),t=d(i(e));!r&&t===e||a(w.current.floatingContext?.refs.floating.current,t)||a(e,t)||c||s(r??t,S.context.triggerElements)||S.setOpen(!1,m(n,o))})}}},[w,v,S,O]);return b.useMemo(()=>h?{reference:k,trigger:k}:{},[h,k])}export{S as t}; 4//# debugId=b0a3ccd4-5d62-58c1-9387-2025ed43e978
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.