"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[14],{1:(e,t,r)=>{function n(e){var t,r,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;ti,default:()=>o});const o=i},352:(e,t,r)=>{r.r(t),r.d(t,{InView:()=>f,default:()=>f,defaultFallbackInView:()=>l,observe:()=>h,useInView:()=>v});var n=r(2);function i(){return i=Object.assign||function(e){for(var t=1;t=e}));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=o),null==(r=i.get(t.target))||r.forEach((function(e){e(o,t)}))}))}),e);n=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),r={id:t,observer:o,elements:i},s.set(t,r)}return r}(r),l=o.id,h=o.observer,d=o.elements,p=d.get(e)||[];return d.has(e)||d.set(e,p),p.push(t),h.observe(e),function(){p.splice(p.indexOf(t),1),0===p.length&&(d.delete(e),h.unobserve(e)),0===d.size&&(h.disconnect(),s.delete(l))}}var d=["children","as","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function p(e){return"function"!=typeof e.children}var f=function(e){var t,r;function s(t){var r;return(r=e.call(this,t)||this).node=null,r._unobserveCb=null,r.handleNode=function(e){r.node&&(r.unobserve(),e||r.props.triggerOnce||r.props.skip||r.setState({inView:!!r.props.initialInView,entry:void 0})),r.node=e||null,r.observeNode()},r.handleChange=function(e,t){e&&r.props.triggerOnce&&r.unobserve(),p(r.props)||r.setState({inView:e,entry:t}),r.props.onChange&&r.props.onChange(e,t)},r.state={inView:!!t.initialInView,entry:void 0},r}r=e,(t=s).prototype=Object.create(r.prototype),t.prototype.constructor=t,o(t,r);var a=s.prototype;return a.componentDidUpdate=function(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())},a.componentWillUnmount=function(){this.unobserve(),this.node=null},a.observeNode=function(){if(this.node&&!this.props.skip){var e=this.props,t=e.threshold,r=e.root,n=e.rootMargin,i=e.trackVisibility,o=e.delay,s=e.fallbackInView;this._unobserveCb=h(this.node,this.handleChange,{threshold:t,root:r,rootMargin:n,trackVisibility:i,delay:o},s)}},a.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},a.render=function(){if(!p(this.props)){var e=this.state,t=e.inView,r=e.entry;return this.props.children({inView:t,entry:r,ref:this.handleNode})}var o=this.props,s=o.children,a=o.as,u=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}(o,d);return n.createElement(a||"div",i({ref:this.handleNode},u),s)},s}(n.Component);function v(e){var t=void 0===e?{}:e,r=t.threshold,i=t.delay,o=t.trackVisibility,s=t.rootMargin,a=t.root,u=t.triggerOnce,c=t.skip,l=t.initialInView,d=t.fallbackInView,p=n.useRef(),f=n.useState({inView:!!l}),v=f[0],b=f[1],y=n.useCallback((function(e){void 0!==p.current&&(p.current(),p.current=void 0),c||e&&(p.current=h(e,(function(e,t){b({inView:e,entry:t}),t.isIntersecting&&u&&p.current&&(p.current(),p.current=void 0)}),{root:a,rootMargin:s,threshold:r,trackVisibility:o,delay:i},d))}),[Array.isArray(r)?r.toString():r,a,s,u,c,o,d,i]);(0,n.useEffect)((function(){p.current||!v.entry||u||c||b({inView:!!l})}));var g=[y,v.inView,v.entry];return g.ref=g[0],g.inView=g[1],g.entry=g[2],g}f.displayName="InView",f.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1}}}]);