This is the home of my writing. I refuse to engage with Substack
{className:"inner",ref:this.containerRef,children:C})]}),this.state.backdropShadowRoot)})}prevSlide=e=>{this.hideNavigation.cancel(),e?.preventDefault(),this.slideshowRef.
current?.prevSlide()};nextSlide=e=>{e?.preventDefault(),this.hideNavigation.cancel(),this.slideshowRef.current?.nextSlide()};onPointerMove=e=>{!this.state.showNavigation
&&this.props.inViewport&&this.setState({showNavigation:!0}),e&&e.target&&this.state.navigationContainer?.contains(e.target)?this.hideNavigation.cancel():this.hideNavigation()};
hideNavigation=Zz.default.debounce(()=>{this.setState({showNavigation:!1})},1500);onMobileChange=e=>{this.setState({isMobile:e})};renderNavigation(){if(!this.props.backdropRef.current)
return;if(this.props.modelArray.length>1&&this.props.settings["cycle-images"]&&!this.state.navigationContainer&&this.props.settings.navigation){let i=document.createElement("div");i.classList.
add("wallpaper-navigation"),this.props.backdropRef.current.closest(".page").appendChild(i),this.setState({navigationContainer:i})}else this.state.navigationContainer&&this.state.navigationContainer.
remove(),this.setState({navigationContainer:null,navigationElement:null})}componentDidMount(){Ye.on("mobile-change",this.onMobileChange),this.wallpaperRef.current&&!this.wallpaperRef.current.shadowRoot&&
this.wallpaperRef.current.attachShadow({mode:"open"}),this.setState({backdropShadowRoot:this.wallpaperRef.current?.shadowRoot}),this.renderNavigation(),window.addEventListener("pointermove",this.onPointerMove)
,setTimeout(()=>{this.setMediaElementProperties()},100)}componentWillUnmount(){Ye.off("mobile-change",this.onMobileChange),this.hideNavigation.cancel(),this.state.navigationContainer&&this.state.navigationContainer.
remove(),window.removeEventListener("pointermove",this.onPointerMove)}componentDidUpdate(e,i){let r=this.getSettings();if((this.props.settings.navigation!==e.settings.navigation||this.props.settings["cycle-images"]
!==e.settings["cycle-images"]||e.modelArray?.length==1&&this.props.modelArray?.length>1)&&(this.renderNavigation(),this.onPointerMove()),this.props.settings.activeImage!==e.settings.activeImage&&this.props.settings
["cycle-images"]&&this.slideshowRef.current){let n=this.slideshowRef.current.querySelector('[hash="'+this.props.settings.activeImage+'"]');if(n){let o=Array.from(this.slideshowRef.current.children).indexOf(n);this.
slideshowRef.current.goToSlide(o)}}this.props.visibility.visible&&this.containerRef.current&&(e.visibility.visible!==this.props.visibility.visible||this.props.settings["cycle-images"]!==e.settings["cycle-images"])
&&this.setMediaElementProperties(),this.navigationRef.current!==this.state.navigationElement&&(this.navigationRef.current&&!this.navigationRef.current.shadowRoot&&this.navigationRef.current.attachShadow({mode:"open"}),
this.setState({navigationElement:this.navigationRef.current}))}setMediaElementProperties=()=>{this.slideshowRef.current&&yt(this.slideshowRef.current,"viewportIntersectionChange",{visible:this.props.visibility.
visible,position:this.props.visibility.position},{bubbles:!1})};onFirstLoad=e=>{if(this.slideshowRef.current){let i=this.slideshowRef.current.getActiveSlide();this.wallpaperRef.current.dispatchEvent(new CustomEvent("
afterSlideChange",{detail:{slideIndex:i[0],mediaItem:i[1]},composed:!1,bubbles:!1}))}this.state.loaded||(this.setState({loaded:!0,showNavigation:!0}),this.props.onLoad&&this.props.onLoad())};onAfterSlideChange=(e,i)
=>{this.wallpaperRef.current.dispatchEvent(new CustomEvent("afterSlideChange",{detail:{slideIndex:e,mediaItem:i},composed:!1,bubbles:!1}))}},Jz=Oe((t,e)=>{let i=Ke.getMediaByParent(t)[e.id],r=i.some(a=>a.loading);i=i.
filter(a=>!a.loading&&!a.is_deleted&&(a.is_video||a.is_image));let n=null,o=e.settings?.activeImage||null;return o===Sx.hash?(n=Sx,i.push(n)):(o&&(n=i.find(a=>a.hash==o)),n||(n=i[0])),!n&&!r&&i.length==0&&(n=Sx,i.push(n))
,e.settings.excluded&&(i=i.filter(a=>e.settings.excluded.indexOf(a.hash)==-1),i.length==1&&e.settings["cycle-images"]&&(n=i[0])),e.settings.order&&i.sort(function(a,l){return e.settings.order.indexOf(a.hash)