"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9650],{29650:function(e,r,t){t.d(r,{o:function(){return b}});var n=t(2784);function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var s,a={exports:{}},u={};a.exports=function(){if(s)return u;s=1;var e=n,r=Symbol.for("react.element"),t=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var s,u={},c=null,p=null;for(s in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(p=t.ref),t)o.call(t,s)&&!i.hasOwnProperty(s)&&(u[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps)void 0===u[s]&&(u[s]=t[s]);return{$$typeof:r,type:e,key:c,ref:p,props:u,_owner:a.current}}return u.Fragment=t,u.jsx=c,u.jsxs=c,u}();var i=a.exports,c={exports:{}};var p,l,f,d;function y(){if(l)return p;l=1;return p="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}c.exports=function(){if(d)return f;d=1;var e=y();function r(){}function t(){}return t.resetWarningCache=r,f=function(){function n(r,t,n,o,s,a){if(a!==e){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function o(){return n}n.isRequired=n;var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:t,resetWarningCache:r};return s.PropTypes=s,s}}()();const _=o(c.exports);(0,n.createContext)({});const h=(e=[])=>{if(!e||!Array.isArray(e)||!e.length)return null;let r=[];return e.forEach((e=>{"string"==typeof e&&r.push(e)})),r.join(" ")},b=(0,n.forwardRef)((({className:e,description:r,paused:t,posterImg:o,prefersReducedMotion:s,renderReducedMotionFallback:a,src:u,loop:c=!0},p)=>{const[l,f]=(0,n.useState)(!1),[d,y]=function(e=.3,r=!0,t=!1){const[o,s]=(0,n.useState)(!1),[a,u]=(0,n.useState)(),i=(0,n.useRef)(),c=(0,n.useCallback)((([e],n)=>{const o=e.isIntersecting||t&&e.boundingClientRect.top<0;s(o),r&&o&&n.unobserve(e.target)}),[r,t]);return(0,n.useEffect)((()=>{if(i.current||!a)return;const r="number"==typeof e?{threshold:e}:e;return i.current=new IntersectionObserver(c,r),i.current.observe(a),()=>{i.current&&i.current.unobserve(a)}}),[c,a,e]),[u,o,a]}(0),_=r?`autoplay-video-desc-${(e=>{let r,t,n=0;if(0===e.length)return n;for(r=0;r{v.current&&v.current.pause()};return(0,n.useEffect)((()=>{y&&f(!0)}),[y]),(0,n.useEffect)((()=>{l&&(t?m():y&&!t?!v.current||t||v.current.play():m())}),[y,l,t,s]),i.jsx("div",{ref:d,className:h(["autoplay-video",e]),children:s&&a?i.jsx("div",{className:"autoplay-video__media",children:a()}):i.jsxs(i.Fragment,{children:[_&&i.jsx("p",{id:_,className:"autoplay-video-util-visually-hidden",children:r}),i.jsx("video",{"aria-describedby":_,autoPlay:!0,className:"autoplay-video__media",loop:c,muted:!0,playsInline:!0,poster:o,ref:v,src:l?u:null})]})})}));b.defaultProps={description:"",inViewRootMargin:"0px 0px 400px 0px",paused:!1,prefersReducedMotion:!1,loop:!0},b.propTypes={className:_.string,description:_.string,paused:_.bool,posterImg:_.string,prefersReducedMotion:_.bool.isRequired,renderReducedMotionFallback:_.func,src:_.string,loop:_.bool},b.displayName="AutoplayVideo"}}]);