forked from duneanalytics/DuneQueryRepo
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path3829-4fe6d7bbc438c6e0.js.download
2 lines (2 loc) · 8.56 KB
/
3829-4fe6d7bbc438c6e0.js.download
1
2
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3829],{44270:function(e,t,n){"use strict";n.d(t,{J2:function(){return f},MN:function(){return v},g0:function(){return b}});var r=n(67294),i=n(14921),o=n(5977),s=n(55152),u=n(61331),a=n(34760),c=n.n(a);function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var f=(0,r.forwardRef)(function(e,t){return(0,r.createElement)(i.h,null,(0,r.createElement)(d,l({ref:t},e)))}),d=(0,r.forwardRef)(function(e,t){var n=e.as,i=void 0===n?"div":n,a=e.targetRef,f=e.position,d=e.unstable_observableRefs,p=void 0===d?[]:d,b=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}(e,["as","targetRef","position","unstable_observableRefs"]),g=(0,r.useRef)(null),y=(0,o.EL)(g,{observe:!b.hidden}),w=(0,o.EL)(a,{observe:!b.hidden}),m=(0,u.e)(g,t);return function(e,t){var n=(0,s.r)(e.current);function i(r){if("Tab"!==r.key||!t.current||0!==c()(t.current).length){var i,s,u,l,f,d,h;"Tab"===r.key&&r.shiftKey?function(e){if(e.shiftKey){var t=o();return e.target===t}}(r)?(s=(i=t.current&&c()(t.current))&&i[i.length-1])&&(r.preventDefault(),s.focus()):(u=t.current&&c()(t.current))&&0!==u.length&&r.target===u[0]?(r.preventDefault(),null==(l=e.current)||l.focus()):r.target===c()(n)[0]&&a():"Tab"!==r.key||(e.current&&e.current===n.activeElement?(f=t.current&&c()(t.current))&&f[0]&&(r.preventDefault(),f[0].focus()):function(){if(t.current&&t.current.contains(n.activeElement||null)){var e=t.current&&c()(t.current);return!!(e&&e[e.length-1]===n.activeElement)}return!1}()?(d=o())&&(r.preventDefault(),d.focus()):(h=t.current?c()(n).filter(function(e){return!t.current.contains(e)}):null)&&r.target===h[h.length-1]&&a())}}function o(){var r=c()(n),i=r&&e.current?r.indexOf(e.current):-1,o=r&&r[i+1];return!(t.current&&t.current.contains(o||null))&&o}(0,r.useEffect)(function(){return n.addEventListener("keydown",i),function(){n.removeEventListener("keydown",i)}},[]);var u=[];function a(){var e=t.current&&c()(t.current);e&&(e.forEach(function(e){u.push([e,e.tabIndex]),e.tabIndex=-1}),n.addEventListener("focusin",l))}function l(){n.removeEventListener("focusin",l),u.forEach(function(e){var t=e[0],n=e[1];t.tabIndex=n})}}(a,g),(0,r.createElement)(i,l({"data-reach-popover":"",ref:m},b,{style:l({position:"absolute"},h.apply(void 0,[void 0===f?v:f,w,y].concat(p)),b.style)}))});function h(e,t,n){for(var r=arguments.length,i=Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];return n?e.apply(void 0,[t,n].concat(i.map(function(e){return e.current}))):{visibility:"hidden"}}function p(e,t,n){return{top:n?e.top-t.height+window.pageYOffset+"px":e.top+e.height+window.pageYOffset+"px"}}var v=function(e,t){if(!e||!t)return{};var n=g(e,t),r=n.directionRight,i=n.directionUp;return l({left:r?e.right-t.width+window.pageXOffset+"px":e.left+window.pageXOffset+"px"},p(e,t,i))},b=function(e,t){if(!e||!t)return{};var n=g(e,t).directionUp;return l({width:e.width,left:e.left},p(e,t,n))};function g(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var i={top:e.top-t.height<0,right:window.innerWidth<e.left+t.width-n,bottom:window.innerHeight<e.bottom+t.height-r,left:e.left+e.width-t.width<0};return{directionRight:i.right&&!i.left,directionLeft:i.left&&!i.right,directionUp:i.bottom&&!i.top,directionDown:i.top&&!i.bottom}}t.ZP=f},34760:function(e){var t=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],n=t.join(","),r="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function i(e,t){t=t||{};var i,s,u,l=[],f=[],d=e.querySelectorAll(n);for(t.includeContainer&&r.call(e,n)&&(d=Array.prototype.slice.apply(d)).unshift(e),i=0;i<d.length;i++)o(s=d[i])&&(0===(u=a(s))?l.push(s):f.push({documentOrder:i,tabIndex:u,node:s}));return f.sort(c).map(function(e){return e.node}).concat(l)}function o(e){var t;return!(!s(e)||l(t=e)&&"radio"===t.type&&!function(e){if(!e.name)return!0;var t=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'));return!t||t===e}(t)||0>a(e))}function s(e){var t;return!(e.disabled||l(e)&&"hidden"===e.type||null===(t=e).offsetParent||"hidden"===getComputedStyle(t).visibility)}i.isTabbable=function(e){if(!e)throw Error("No node provided");return!1!==r.call(e,n)&&o(e)},i.isFocusable=function(e){if(!e)throw Error("No node provided");return!1!==r.call(e,u)&&s(e)};var u=t.concat("iframe").join(",");function a(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?"true"===e.contentEditable?0:e.tabIndex:t}function c(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function l(e){return"INPUT"===e.tagName}e.exports=i},51681:function(e,t,n){"use strict";n.d(t,{YD:function(){return h},df:function(){return d}});var r=n(67294),i=Object.defineProperty,o=(e,t,n)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,s=(e,t,n)=>(o(e,"symbol"!=typeof t?t+"":t,n),n),u=new Map,a=new WeakMap,c=0,l=void 0;function f(e,t,n={},r=l){if(void 0===window.IntersectionObserver&&void 0!==r){let i=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:i,intersectionRect:i,rootBounds:i}),()=>{}}let{id:i,observer:o,elements:s}=function(e){let t=Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{var n;return`${t}_${"root"===t?(n=e.root)?(a.has(n)||(c+=1,a.set(n,c.toString())),a.get(n)):"0":e[t]}`}).toString(),n=u.get(t);if(!n){let r;let i=new Map,o=new IntersectionObserver(t=>{t.forEach(t=>{var n;let o=t.isIntersecting&&r.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=o),null==(n=i.get(t.target))||n.forEach(e=>{e(o,t)})})},e);r=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:o,elements:i},u.set(t,n)}return n}(n),f=s.get(e)||[];return s.has(e)||s.set(e,f),f.push(t),o.observe(e),function(){f.splice(f.indexOf(t),1),0===f.length&&(s.delete(e),o.unobserve(e)),0===s.size&&(o.disconnect(),u.delete(i))}}var d=class extends r.Component{constructor(e){super(e),s(this,"node",null),s(this,"_unobserveCb",null),s(this,"handleNode",e=>{!this.node||(this.unobserve(),e||this.props.triggerOnce||this.props.skip||this.setState({inView:!!this.props.initialInView,entry:void 0})),this.node=e||null,this.observeNode()}),s(this,"handleChange",(e,t)=>{e&&this.props.triggerOnce&&this.unobserve(),"function"!=typeof this.props.children||this.setState({inView:e,entry:t}),this.props.onChange&&this.props.onChange(e,t)}),this.state={inView:!!e.initialInView,entry:void 0}}componentDidMount(){this.unobserve(),this.observeNode()}componentDidUpdate(e){(e.rootMargin!==this.props.rootMargin||e.root!==this.props.root||e.threshold!==this.props.threshold||e.skip!==this.props.skip||e.trackVisibility!==this.props.trackVisibility||e.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve()}observeNode(){if(!this.node||this.props.skip)return;let{threshold:e,root:t,rootMargin:n,trackVisibility:r,delay:i,fallbackInView:o}=this.props;this._unobserveCb=f(this.node,this.handleChange,{threshold:e,root:t,rootMargin:n,trackVisibility:r,delay:i},o)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){let{children:e}=this.props;if("function"==typeof e){let{inView:t,entry:n}=this.state;return e({inView:t,entry:n,ref:this.handleNode})}let{as:t,triggerOnce:n,threshold:i,root:o,rootMargin:s,onChange:u,skip:a,trackVisibility:c,delay:l,initialInView:f,fallbackInView:d,...h}=this.props;return r.createElement(t||"div",{ref:this.handleNode,...h},e)}};function h({threshold:e,delay:t,trackVisibility:n,rootMargin:i,root:o,triggerOnce:s,skip:u,initialInView:a,fallbackInView:c,onChange:l}={}){var d;let[h,p]=r.useState(null),v=r.useRef(),[b,g]=r.useState({inView:!!a,entry:void 0});v.current=l,r.useEffect(()=>{let r;if(!u&&h)return r=f(h,(e,t)=>{g({inView:e,entry:t}),v.current&&v.current(e,t),t.isIntersecting&&s&&r&&(r(),r=void 0)},{root:o,rootMargin:i,threshold:e,trackVisibility:n,delay:t},c),()=>{r&&r()}},[Array.isArray(e)?e.toString():e,h,o,i,s,u,n,c,t]);let y=null==(d=b.entry)?void 0:d.target,w=r.useRef();h||!y||s||u||w.current===y||(w.current=y,g({inView:!!a,entry:void 0}));let m=[p,b.inView,b.entry];return m.ref=m[0],m.inView=m[1],m.entry=m[2],m}}}]);
//# sourceMappingURL=3829-4fe6d7bbc438c6e0.js.map