"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[2909],{99051:function(e,n,t){var r=t(96902),u=t(69989),c=t(41561),o=t(62009),i=t(29938);function f(e){return e.substring(2).toLowerCase()}n.Z=function(e){var n=e.children,t=e.disableReactTree,s=void 0!==t&&t,a=e.mouseEvent,v=void 0===a?"onClick":a,d=e.onClickAway,l=e.touchEvent,m=void 0===l?"onTouchEnd":l,E=r.useRef(!1),h=r.useRef(null),b=r.useRef(!1),w=r.useRef(!1);r.useEffect((function(){return setTimeout((function(){b.current=!0}),0),function(){b.current=!1}}),[]);var p=(0,u.Z)(n.ref,h),L=(0,c.Z)((function(e){var n=w.current;w.current=!1;var t=(0,o.Z)(h.current);!b.current||!h.current||"clientX"in e&&function(e,n){return n.documentElement.clientWidth<e.clientX||n.documentElement.clientHeight<e.clientY}(e,t)||(E.current?E.current=!1:(e.composedPath?e.composedPath().indexOf(h.current)>-1:!t.documentElement.contains(e.target)||h.current.contains(e.target))||!s&&n||d(e))})),Z=function(e){return function(t){w.current=!0;var r=n.props[e];r&&r(t)}},k={ref:p};return!1!==m&&(k[m]=Z(m)),r.useEffect((function(){if(!1!==m){var e=f(m),n=(0,o.Z)(h.current),t=function(){E.current=!0};return n.addEventListener(e,L),n.addEventListener("touchmove",t),function(){n.removeEventListener(e,L),n.removeEventListener("touchmove",t)}}}),[L,m]),!1!==v&&(k[v]=Z(v)),r.useEffect((function(){if(!1!==v){var e=f(v),n=(0,o.Z)(h.current);return n.addEventListener(e,L),function(){n.removeEventListener(e,L)}}}),[L,v]),(0,i.jsx)(r.Fragment,{children:r.cloneElement(n,k)})}},32909:function(e,n,t){t.r(n),t.d(n,{default:function(){return r.Z}});var r=t(99051)}}]);
//# sourceMappingURL=2909.33101fbf.chunk.js.map