import{H as r,a as s,h as o}from"./app.Bk0M9xuT.js";import"./index.3whys8t3.js";class d extends HTMLElement{infoContent=null;directoryContent=null;seriesContent=null;pageType=null;defaultType=null;constructor(){super(),this.infoContent=this.querySelector('[slot="info"]'),this.directoryContent=this.querySelector('[slot="directory"]'),this.seriesContent=this.querySelector('[slot="series"]'),this.pageType=this.getAttribute("data-type"),this.defaultType=this.getAttribute("data-default-type"),this.init()}init(){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>this.initContent()):this.initContent()}initContent(){if(this.pageType===r.HOME)this.showContent(s.INFO,!0);else{const i=this.defaultType||s.INFO;o.set(i),this.showContent(i,!0),o.listen(n=>{this.showContent(n,!1)})}}showContent(i,n=!1){let t=null;if(i===s.DIRECTORY?t=this.directoryContent:i===s.SERIES?t=this.seriesContent:t=this.infoContent,n){[this.infoContent,this.directoryContent,this.seriesContent].forEach(e=>{e?.classList.add("hidden")}),t?.classList.remove("hidden");return}t&&!t.classList.contains("hidden")||([this.infoContent,this.directoryContent,this.seriesContent].forEach(e=>{e&&e!==t&&!e.classList.contains("hidden")&&(e.classList.add("exiting"),setTimeout(()=>{e.classList.add("hidden"),e.classList.remove("exiting")},200))}),t&&(t.classList.remove("hidden"),requestAnimationFrame(()=>{t?.classList.add("entering"),setTimeout(()=>{t?.classList.remove("entering")},200)})))}}customElements.define("sider-content",d);
