/*! VERSION | 10.78.9 */"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[8168],{899:(t,e,i)=>{i.d(e,{ZP:()=>A});var s=i(18775),r=i(2979),h=i(27378);let o=t=>t,n=t=>1-(1-t)**5,a=t=>1-(1-t)**4,l=t=>{1!==t.touches.length||t.touches[0].pageX>10&&t.touches[0].pageX<window.innerWidth-10||t.preventDefault()},c=(0,r.C5)()&&(/(iPhone|iPod|iPad)/i.test(navigator.userAgent)||/(iPhone|iPod|iPad)/i.test(navigator.platform)),d=t=>{let e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)},p=t=>{let e=0,i=t.length/2;for(let s of t){let t=Number(s.aspectRatio)||1;if(t>=1&&++e>=i)return!0}return!1},m=({isMobileMode:t,targetAspectRatio:e,photoWidth:i,saveThresholdHeightDesktop:s})=>t?Math.min(i/e,1.5*i,Math.max(window.innerHeight,window.innerWidth)):Math.min(i/e,1.5*i,window.innerHeight-s),u=()=>h.createElement("svg",{width:"30",height:"30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 0C6.716 0 0 6.716 0 15c0 8.284 6.716 15 15 15 8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15zm2.07 15.004l-4.715-4.713c-.473-.474-.461-1.252 0-1.726a1.21 1.21 0 011.713 0l5.577 5.577a1.21 1.21 0 010 1.713l-5.577 5.576a1.21 1.21 0 01-1.713 0 1.21 1.21 0 010-1.713l4.714-4.714z",fill:"currentColor"})),g="undefined"!=typeof document?document.querySelector("html"):null,S=function(){let t=0;return{add(){t++,g.classList.add("image-swiper__root")},remove(){0===(t=Math.max(--t,0))&&g.classList.remove("image-swiper__root")}}}(),f=t=>{let{event:e,startX:i,startY:s,shouldUsePlatformScrollFix:r}=t,{clientX:h,clientY:o}=e.targetTouches[0],n=Math.max(i,h)-Math.min(i,h);return!(n<Math.max(s,o)-Math.min(s,o)&&(n<4||!r))},v=t=>{let{event:e,startX:i,startY:s}=t,{clientX:r,clientY:h}=e.targetTouches[0],o=Math.max(s,h)-Math.min(s,h);return!(Math.max(i,r)-Math.min(i,r)>o&&o<4)},w=h.forwardRef(({count:t,isVisible:e},i)=>!t||t<2?null:h.createElement("div",{className:(0,r.AK)({"image-swiper__points":!0,"image-swiper__points--hidden":!e}),ref:i},Array.from({length:t}).map((t,e)=>h.createElement("span",{key:e}))));class M extends h.PureComponent{componentDidMount(){this.enableResizeWatch();let{isFixedBodyScroll:t=!0,allowKeyArrowsControls:e,items:i}=this.props;e&&document.addEventListener("keydown",this.handleKeyDown,{passive:!0}),i.length&&(this.updateSize(),this.setActiveDot(),this.setArrows(),this.preloadSiblingSlides(),t&&S.add(),c&&(this.wrapperRef.current.addEventListener("touchstart",l),this.forceUpdate()),this.setTouchHandler(!this.props.isLocked))}componentDidUpdate(t){if(this.props.items.length){var e;this.props.items.length!==t.items.length?(this.reset(),this.preloadSiblingSlides(!0)):this.props.items[0].aspectRatio!==(null===(e=t.items[0])||void 0===e?void 0:e.aspectRatio)?requestAnimationFrame(()=>{this.stopAndFix(!0),this.preloadSiblingSlides(!0)}):this.props.items.some((e,i)=>e.url!==t.items[i].url)&&(this.stopAndFix(!0),this.preloadSiblingSlides(!0)),this.props.items!==t.items&&this.props.items.some(({url:e},i)=>!t.items[i]||t.items[i].url!==e)&&this.updatePreloadedBackgrounds(),this.props.allowKeyArrowsControls!==t.allowKeyArrowsControls&&(this.props.allowKeyArrowsControls?document.addEventListener("keydown",this.handleKeyDown,{passive:!0}):document.removeEventListener("keydown",this.handleKeyDown))}this.isStrictHeightChanged()&&requestAnimationFrame(()=>{this.stopAndFix(!0)}),this.props.isLocked!==t.isLocked&&(this.setTouchHandler(!this.props.isLocked),this.stopMove(),this.scrollFix())}componentWillUnmount(){let{isFixedBodyScroll:t=!0}=this.props;cancelAnimationFrame(this.resizeAnimationFrame),this.disableResizeWatch(),this.stopMove(),this.setTouchHandler(!1),document.removeEventListener("keydown",this.handleKeyDown),this.wrapperRef.current.removeEventListener("touchstart",l),t&&S.remove(),clearTimeout(this.clickUnlockTimeout)}setTouchHandler(t){t?this.wrapperRef.current.addEventListener("touchstart",this.handleTouchStart,{passive:!0}):(this.wrapperRef.current.removeEventListener("touchstart",this.handleTouchStart),document.removeEventListener("touchend",this.handleTouchEnd),document.removeEventListener("touchmove",this.handleFirstTouchMove),document.removeEventListener("touchmove",this.handleTouchMove))}preloadSiblingSlides(t=!1){this.setImageBackground(this.currentSlideIndex,t),this.setImageBackground(this.currentSlideIndex+1,t),this.setImageBackground(this.currentSlideIndex-1,t)}enableResizeWatch(){this.disableResizeWatch(),"function"==typeof ResizeObserver?(this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.wrapperRef.current)):window.addEventListener("resize",this.handleResize)}disableResizeWatch(){window.removeEventListener("resize",this.handleResize),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}updateHeightByTargetAspectRatio(t){this.photoHeight=m({targetAspectRatio:t,isMobileMode:this.isMobileMode,photoWidth:this.photoWidth,saveThresholdHeightDesktop:this.props.saveThresholdHeightDesktop||0})}updateSize(t=!1){if(!t&&!this.isSizeChanged())return;let e=window.innerWidth<1024,{onChangeMode:i,items:s,getStrictHeight:r,baseSlideIndex:h,maxHeight:o,isVertical:n}=this.props;if(i&&e!==this.isMobileMode&&i({isMobileMode:e}),this.isMobileMode=e,this.photoWidth=this.wrapperRef.current.offsetWidth,r)this.photoHeight=r(this.photoWidth,this.currentSlideIndex);else{if(s.length>1){if(p(s))this.photoHeight=.75*this.photoWidth;else{let t=this.getTheMostTallPhotoAspectRatio();this.updateHeightByTargetAspectRatio(t)}}else{let t=Number(s[h||0].aspectRatio)||1;this.updateHeightByTargetAspectRatio(t)}this.photoHeight=Math.min(this.photoHeight,o||1/0)}let a=this.getImageItems();this.wrapperRef.current.style.height=`${this.photoHeight}px`,n?(this.wrapperScrollRef.current.style.width=`${this.photoWidth+50}px`,this.wrapperScrollSpaceRef.current.style.height=`${this.photoHeight*s.length+1e3}px`,a.forEach((t,e)=>{t.style.width=`${this.photoWidth}px`,t.style.height=`${this.photoHeight}px`,t.style.top=`${this.photoHeight*e+500}px`})):(this.wrapperScrollRef.current.style.height=`${this.photoHeight+50}px`,this.wrapperScrollSpaceRef.current.style.width=`${this.photoWidth*s.length+1e3}px`,a.forEach((t,e)=>{t.style.width=`${this.photoWidth}px`,t.style.height=`${this.photoHeight}px`,t.style.left=`${this.photoWidth*e+500}px`}))}getTheMostTallPhotoAspectRatio(){return this.props.items.reduce((t,e)=>{let i=Number(e.aspectRatio)||1;return i<t?i:t},1/0)}getImageItems(){return[...this.wrapperScrollRef.current.children].filter(t=>t.classList.contains("image-swiper__item"))}getImageItem(t){return this.props.isImageTag?[...this.getImageItems()[t].children].find(t=>t.classList.contains("image-swiper__item-image")):this.getImageItems()[t]}stopMove(){this.watchMove=!1,this.isInAnimation=!1,cancelAnimationFrame(this.lastAnimationFrame),document.removeEventListener("touchend",this.handleTouchEnd),document.removeEventListener("touchmove",this.handleFirstTouchMove),document.removeEventListener("touchmove",this.handleTouchMove);let{isFixedBodyScroll:t=!0}=this.props;t&&g.classList.remove("image-swiper__root--disabled")}setActiveDot(){if(!this.wrapperPointsRef.current)return;let{children:t}=this.wrapperPointsRef.current;for(let e=0;e<t.length;e++)t[e].className=e===this.currentSlideIndex?"active":""}setArrows(){this.wrapperArrowLeft.current&&(this.wrapperArrowLeft.current.classList.toggle("image-swiper__arrow--active",this.currentSlideIndex>0),this.wrapperArrowRight.current.classList.toggle("image-swiper__arrow--active",this.currentSlideIndex<this.props.items.length-1))}updatePreloadedBackgrounds(){let t=this.getImageItems();t.forEach((t,e)=>{let i=t.querySelector(".image-swiper__item-image")||t;if(i.style.backgroundImage||i.getAttribute("src")){let t=this.props.items[e];if(!t)return;i instanceof HTMLImageElement?i.src=t.url:i.style.backgroundImage=`url(${t.url})`}})}setImageBackground(t,e=!1){let i=this.props.items[t];if(!i||!i.url)return;let s=this.getImageItem(t);if(s instanceof HTMLImageElement){if(!e&&s.getAttribute("src"))return;s.src=i.url}else{if(!e&&s.style.backgroundImage)return;s.style.backgroundImage=`url(${i.url})`}}stopAndFix(t=!1){this.stopMove();let{items:e}=this.props;e.length&&this.wrapperRef.current&&(this.updateSize(t),this.setActiveDot(),this.scrollFix(),this.setArrows())}scrollFix(){let{isVertical:t}=this.props;t?(this.currentMoveShift=this.currentSlideIndex*this.photoHeight+500,this.wrapperScrollRef.current.scrollTop=this.currentMoveShift):(this.currentMoveShift=this.currentSlideIndex*this.photoWidth+500,this.wrapperScrollRef.current.scrollLeft=this.currentMoveShift)}reset(){let{initialSlideIndex:t,isVertical:e}=this.props;this.currentSlideIndex=t||0,e?this.currentMoveShift=this.currentSlideIndex*this.photoHeight+500:this.currentMoveShift=this.currentSlideIndex*this.photoWidth+500,this.stopAndFix(!0)}setSlideIndex(t){if(this.currentSlideIndex===t)return;this.setImageBackground(t-1),this.setImageBackground(t+1);let e=this.currentSlideIndex;this.currentSlideIndex=t,this.props.onChangeSlide&&this.props.onChangeSlide(t,e)}setSlideWithAnimate(t,e="moveFix"){this.setSlideIndex(t);let i=this.currentMoveShift,{isVertical:s}=this.props;s?this.currentMoveShift=this.currentSlideIndex*this.photoHeight+500:this.currentMoveShift=this.currentSlideIndex*this.photoWidth+500,Math.max(i,this.currentMoveShift)-Math.min(i,this.currentMoveShift)<.25||(this.startAnimationTime=0,this.animationStartPosition=s?this.wrapperScrollRef.current.scrollTop:this.wrapperScrollRef.current.scrollLeft,this.animationEndPosition=this.currentMoveShift,"moveFix"===e?(this.animationEasing=o,this.animationDuration=Math.min((Math.max(i,this.currentMoveShift)-Math.min(i,this.currentMoveShift))*1.5,500)):"swipe"===e?(this.animationEasing=n,this.animationDuration=500):(this.animationEasing=a,this.animationDuration=Math.min((Math.max(i,this.currentMoveShift)-Math.min(i,this.currentMoveShift))*1.5,430)),this.isInAnimation=!0,this.startAnimation(),this.setArrows(),this.setActiveDot())}startAnimation(){cancelAnimationFrame(this.lastAnimationFrame),this.lastAnimationFrame=requestAnimationFrame(this.animationFrame)}isSizeChanged(){return this.photoWidth!==this.wrapperRef.current.offsetWidth||this.props.maxHeight&&this.props.maxHeight<this.photoHeight||this.isStrictHeightChanged()}isStrictHeightChanged(){return this.props.getStrictHeight&&this.props.getStrictHeight(this.photoWidth,this.currentSlideIndex)!==this.photoHeight}renderPhotos(){let{items:t,isImageTag:e}=this.props;return t.map(({id:t,content:i,size:s="cover"})=>h.createElement("div",{key:t,className:(0,r.AK)({"image-swiper__item":!0,[`image-swiper__item--size--${s}`]:!0})},e&&h.createElement("img",{alt:"",decoding:"async",className:(0,r.AK)({"image-swiper__item-image":!0,[`image-swiper__item-image--size--${s}`]:!0})}),i||null))}render(){let{children:t,items:e,isLocked:i,isVisiblePoints:s=!0,onClick:r}=this.props;return h.createElement("div",{className:"image-swiper",onClick:r?this.handleClick:void 0,ref:this.wrapperRef,style:e.length?void 0:{display:"none"}},h.createElement("div",{className:"image-swiper__scroll",ref:this.wrapperScrollRef},this.renderPhotos(),h.createElement("span",{className:"image-swiper__scroll-space",ref:this.wrapperScrollSpaceRef})),!!t&&h.createElement("div",{className:"image-swiper__children"},t),h.createElement(w,{isVisible:s,count:this.props.items.length,ref:this.wrapperPointsRef}),!i&&h.createElement(h.Fragment,null,h.createElement("div",{className:"image-swiper__arrow image-swiper__arrow--left",ref:this.wrapperArrowLeft,onClick:this.handleArrowClick},u()),h.createElement("div",{className:"image-swiper__arrow image-swiper__arrow--right",ref:this.wrapperArrowRight,onClick:this.handleArrowClick},u())))}constructor(t){super(t),(0,s._)(this,"wrapperRef",h.createRef()),(0,s._)(this,"wrapperScrollRef",h.createRef()),(0,s._)(this,"wrapperScrollSpaceRef",h.createRef()),(0,s._)(this,"wrapperPointsRef",h.createRef()),(0,s._)(this,"wrapperArrowLeft",h.createRef()),(0,s._)(this,"wrapperArrowRight",h.createRef()),(0,s._)(this,"resizeObserver",null),(0,s._)(this,"isClickLocked",!1),(0,s._)(this,"clickUnlockTimeout",-1),(0,s._)(this,"watchMove",!1),(0,s._)(this,"isInAnimation",!1),(0,s._)(this,"startAnimationTime",0),(0,s._)(this,"photoWidth",0),(0,s._)(this,"photoHeight",0),(0,s._)(this,"currentSlideIndex",void 0),(0,s._)(this,"startSlideIndex",0),(0,s._)(this,"lastTouchX",0),(0,s._)(this,"lastTouchY",0),(0,s._)(this,"touchStartPosition",0),(0,s._)(this,"isMobileMode",!1),(0,s._)(this,"currentMoveShift",0),(0,s._)(this,"touchStartX",0),(0,s._)(this,"touchStartY",0),(0,s._)(this,"lastAnimationFrame",-1),(0,s._)(this,"animationStartPosition",0),(0,s._)(this,"animationEndPosition",0),(0,s._)(this,"animationEasing",o),(0,s._)(this,"animationDuration",0),(0,s._)(this,"resizeAnimationFrame",0),(0,s._)(this,"animationFrame",t=>{if(!this.isInAnimation)return;let{isVertical:e}=this.props;this.startAnimationTime||(this.startAnimationTime=t);let i=this.wrapperScrollRef.current,s=(t-this.startAnimationTime)/this.animationDuration;if(s>=1){e?(i.scrollTop=this.animationEndPosition,this.handleAnimationEnd(),i.scrollTop<this.currentMoveShift?i.scrollTop=this.currentMoveShift+.3:i.scrollTop>this.currentMoveShift&&(i.scrollTop=this.currentMoveShift-.3)):(i.scrollLeft=this.animationEndPosition,this.handleAnimationEnd(),i.scrollLeft<this.currentMoveShift?i.scrollLeft=this.currentMoveShift+.3:i.scrollLeft>this.currentMoveShift&&(i.scrollLeft=this.currentMoveShift-.3));return}let r=this.animationEasing(s);e?i.scrollTop=this.animationStartPosition+(this.animationEndPosition-this.animationStartPosition)*r:i.scrollLeft=this.animationStartPosition+(this.animationEndPosition-this.animationStartPosition)*r,this.lastAnimationFrame=requestAnimationFrame(this.animationFrame)}),(0,s._)(this,"handleKeyDown",t=>{!(this.props.isLocked||"ArrowLeft"!==t.key&&"ArrowRight"!==t.key||this.isInAnimation||this.watchMove||(0,r.GQ)())&&d(this.wrapperRef.current)&&("ArrowLeft"===t.key?this.currentSlideIndex>0&&this.setSlideWithAnimate(this.currentSlideIndex-1,"arrow"):this.currentSlideIndex<this.props.items.length-1&&this.setSlideWithAnimate(this.currentSlideIndex+1,"arrow"))}),(0,s._)(this,"handleArrowClick",t=>{if(this.props.isLocked||(t.stopPropagation(),this.isInAnimation))return;this.stopMove();let e=t.target===this.wrapperArrowLeft.current?this.currentSlideIndex-1:this.currentSlideIndex+1;this.setSlideWithAnimate(e,"arrow"),this.isClickLocked=0===this.currentSlideIndex||this.currentSlideIndex===this.props.items.length-1,this.isClickLocked&&(clearTimeout(this.clickUnlockTimeout),this.clickUnlockTimeout=setTimeout(()=>{this.isClickLocked=!1},1e3))}),(0,s._)(this,"handleAnimationEnd",()=>{this.isInAnimation=!1,this.startAnimationTime=0,this.props.onSwipeAnimationEnd&&this.props.onSwipeAnimationEnd(this.currentSlideIndex)}),(0,s._)(this,"handleTouchStart",t=>{if(this.watchMove||1!==t.touches.length)return;let{isVertical:e}=this.props;this.isInAnimation=!1,cancelAnimationFrame(this.lastAnimationFrame),this.currentMoveShift=e?this.wrapperScrollRef.current.scrollTop:this.wrapperScrollRef.current.scrollLeft,this.watchMove=!0,this.startSlideIndex=this.currentSlideIndex;let{clientX:i,clientY:s}=t.touches[0];this.props.isVertical?(this.lastTouchY=s,this.touchStartPosition=this.currentMoveShift+s):(this.lastTouchX=i,this.touchStartPosition=this.currentMoveShift+i),this.touchStartX=i,this.touchStartY=s,document.addEventListener("touchend",this.handleTouchEnd),document.addEventListener("touchmove",this.handleFirstTouchMove,{once:!0,passive:!1})}),(0,s._)(this,"handleFirstTouchMove",t=>{let{isVertical:e,checkIsFirstMoveValid:i}=this.props,s={event:t,startX:this.touchStartX,startY:this.touchStartY,shouldUsePlatformScrollFix:c};if(e&&!(i||v)(s)||!e&&!(i||f)(s)){this.watchMove=!1,document.removeEventListener("touchmove",this.handleTouchMove),this.setSlideWithAnimate(this.currentSlideIndex);return}this.watchMove=!0,this.handleTouchMove(t),document.addEventListener("touchmove",this.handleTouchMove,{passive:!1});let{isFixedBodyScroll:r=!0}=this.props;r&&g.classList.add("image-swiper__root--disabled")}),(0,s._)(this,"handleTouchMove",t=>{let e;if(!this.watchMove)return;let{items:i,isVertical:s}=this.props,{clientX:r,clientY:h}=t.targetTouches[0];if(s?(this.currentMoveShift=this.touchStartPosition-h,this.lastTouchY=h,e=(i.length-1)*this.photoHeight+500):(this.currentMoveShift=this.touchStartPosition-r,this.lastTouchX=r,e=(i.length-1)*this.photoWidth+500),this.currentMoveShift<500){let t=500-this.currentMoveShift;this.currentMoveShift+=.4*t}else if(this.currentMoveShift>e){let t=this.currentMoveShift-e;this.currentMoveShift-=.4*t}let o=Math.round((this.currentMoveShift-500)/(s?this.photoHeight:this.photoWidth));o=Math.min(Math.max(o,0),i.length-1),this.setSlideIndex(o),this.setActiveDot(),s?this.wrapperScrollRef.current.scrollTop=this.currentMoveShift:this.wrapperScrollRef.current.scrollLeft=this.currentMoveShift,t.preventDefault()}),(0,s._)(this,"handleTouchEnd",t=>{if(t.touches.length||!this.watchMove)return;let{items:e,isVertical:i}=this.props;if(i&&this.touchStartY>this.lastTouchY||!i&&this.touchStartX>this.lastTouchX){this.stopMove(),this.setSlideWithAnimate(this.currentSlideIndex<e.length-1?Math.min(this.currentSlideIndex+1,this.startSlideIndex+1):this.currentSlideIndex,"swipe");return}if(i&&this.touchStartY<this.lastTouchY||!i&&this.touchStartX<this.lastTouchX){this.stopMove(),this.setSlideWithAnimate(this.currentSlideIndex>0?Math.max(this.currentSlideIndex-1,this.startSlideIndex-1):0,"swipe");return}this.stopMove(),this.setSlideWithAnimate(this.currentSlideIndex)}),(0,s._)(this,"handleResize",()=>{cancelAnimationFrame(this.resizeAnimationFrame),this.resizeAnimationFrame=requestAnimationFrame(()=>{this.stopAndFix()})}),(0,s._)(this,"handleClick",()=>{this.props.isLocked||this.isClickLocked||this.isInAnimation||!this.props.onClick||this.props.onClick(this.props.items[this.currentSlideIndex],{isMobileMode:this.isMobileMode})}),this.currentSlideIndex=t.initialSlideIndex||0}}let A=M},23237:(t,e,i)=>{i.d(e,{Z:()=>l});var s=i(27378),r=i(94380),h=i(56771),o=i(24043),n=i(88065),a=i(68158);let l=({isClickable:t,video:e,model:i})=>{let l=(0,r.T)(),{likes:c,liked:d}=(0,a.x)(e);return s.createElement(n.ZP,{isClickable:t,likes:c,liked:d,signUpMessageId:"regAndLikeVideoMsg",onLike:()=>{let t=d?o.Hr:o.Xt;l((0,h.J9)({videoId:e.id,liked:!d})),l(t(i.id,e.id))},modelThatOwnsContent:i})}},11892:(t,e,i)=>{i.d(e,{Z:()=>a});var s=i(27378),r=i(94380),h=i(24043),o=i(88065),n=i(68158);let a=({textPost:t,...e})=>{let i=(0,r.T)(),{likes:a,liked:l}=(0,n.x)(t);return s.createElement(o.ZP,{likes:a,liked:l,signUpMessageId:"regAndLikeContentMsg",onLike:()=>{let e=l?h.sH:h.cL;i(e(t.id))},...e})}}}]);