1import{_ as P,c as V,m as N,w as T}from"./app.js";import"./swiper.js";const A={name:"ThumbNavigationLink",components:{SoylentLink:N,CmmsResponsiveImage:V},props:["url","image","color","label"],computed:{elementStyle:function(){const e={};return this.image?e["background-color"]="transparent":this.color&&(e["background-color"]=this.color),e}}},S=window.Vue.resolveComponent,k=window.Vue.openBlock,b=window.Vue.createBlock,M=window.Vue.createCommentVNode,x=window.Vue.toDisplayString,I=window.Vue.createElementVNode,B=window.Vue.normalizeStyle,E=window.Vue.withCtx,z={class:"title"};function F(e,t,o,v,i,l){const p=S("CmmsResponsiveImage"),w=S("soylent-link");return k(),b(w,{url:o.url,style:B(l.elementStyle),class:"nav-item"},{default:E(()=>[o.image?(k(),b(p,{key:0,fill:!0,image:o.image},null,8,["image"])):M("",!0),I("span",z,x(o.label),1)]),_:1},8,["url","style"])}const C=P(A,[["render",F]]);let m=!1;const R={name:"SoylentScheduleDetail",components:{SoylentLink:N,ThumbNavigationLink:C,CmmsResponsiveImage:V},props:["element"],data(){return{activePanel:"schedule",selectedDay:0,currentProgramIndex:0,showAll:!1,dayNamePrefixes:["mon","tue","wed","thu","fri","sat","sun"]}},computed:{currentProgramModel(){const e=this.element.data.model;return Array.isArray(e)?e[this.currentProgramIndex]:e},programList(){const e=this.element.data.model;let t=[];if(Array.isArray(e))for(let o=0;o<e.length;o++)t.push({title:e[o].title,id:e[o].program_id});return t},thumbNavigationLink:function(){return T.getByName("thumbNavigationLink",C)},showsForSelectedDay:function(){if("program"in this.currentProgramModel){if(!this.currentProgramModel.program[this.selectedDay])return[];let e=this.currentProgramModel.program[this.selectedDay].shows||[];return e&&(e=e.filter(this.checkShowIsNotInPast)),e}else return[]},getCurrentTimeStamp(){return Math.round(Date.now()/1e3)},getCurrentDay(){return"is_editor_element"in this.currentProgramModel?0:(new Date().getDay()+6)%7},showShowAllButton(){return this.showAll===!1&&this.selectedDay===this.getCurrentDay},hasShows(){return this.currentProgramModel.all_shows.length>0}},methods:{getTimeStamp(e){const t=new Date,o=e.split(":");return t.setHours(parseInt(o[0],10)),t.setMinutes(parseInt(o[1],10)),Math.round(t.getTime()/1e3)},getTimeLabel(e,t,o,v){let i=e;return this.getTimeStamp(e)<this.getCurrentTimeStamp&&this.getTimeStamp(t)>this.getCurrentTimeStamp&&o===this.getCurrentDay&&m!=!0&&(i="Jetzt",m=!0),i},checkShowIsNotInPast(e){return!(this.getTimeStamp(e.from)<this.getCurrentTimeStamp&&this.getTimeStamp(e.to)<this.getCurrentTimeStamp&&e.to!="00:00"&&this.showAll===!1&&e.offset===this.getCurrentDay)},changeSelectedDay(e){m=!1,this.selectedDay=e},changeSelectedProgram(e){m=!1,this.currentProgramIndex=e,this.showSchedulePanel()},getShowStyles(e){let t="";return typeof e.thumb<"u"?t="background-color: transparent;":typeof e.color<"u"&&(t="background-color: ".concat(e.color,";")),t},showSchedulePanel(){this.activePanel="schedule"},showShowsPanel(){this.activePanel="shows"},showShowAllAction(){this.showAll=!0},getAnchor(e){if("weekday"in e){let t=e.weekday-1;return t<0&&(t=6),this.dayNamePrefixes[t]+"-"+e.from.replace(":","_")}return this.dayNamePrefixes[this.selectedDay]+"-"+e.from.replace(":","_")},desktopDate(e){return"date"in e?". "+e.date:this.$filters.everythingExceptFirstNLetters(e.label,2)}},mounted(){m=!1,"is_editor_element"in this.currentProgramModel?this.selectedDay=0:this.selectedDay=(new Date().getDay()+6)%7}},h=window.Vue.renderList,_=window.Vue.Fragment,r=window.Vue.openBlock,a=window.Vue.createElementBlock,d=window.Vue.toDisplayString,n=window.Vue.createElementVNode,f=window.Vue.withModifiers,u=window.Vue.normalizeClass,g=window.Vue.createCommentVNode,D=window.Vue.resolveComponent,y=window.Vue.createBlock,H=window.Vue.withCtx,J=window.Vue.resolveDynamicComponent,Z={class:"tab-navigation"},j=["onClick"],q={class:"entry-title"},G={key:0,class:"tab"},K={class:"panels",tabindex:"-1"},O={class:"idvl_schedule-wrapper"},Q={class:"idvl_schedule-nav"},U=["onClick"],W={class:"--desktop-only"},X={class:"idvl_schedule-container"},Y={class:"idvl_schedule-list"},$=["id","data-timestamp"],ee={class:"time"},te={class:"time-text"},ne={class:"item-wrapper"},se={class:"image"},le={class:"content-wrapper"},oe=["innerHTML"],re={class:"thumb-navigation-wrapper"},ie={class:"thumb-navigation"};function ae(e,t,o,v,i,l){const p=D("CmmsResponsiveImage"),w=D("SoylentLink");return r(),a("div",{class:u(["element",o.element.type,o.element.subtype])},[n("ul",Z,[(r(!0),a(_,null,h(l.programList,(s,c)=>(r(),a("li",{key:c,class:"tab"},[n("button",{class:u(i.activePanel==="schedule"&&c===i.currentProgramIndex?"--active":""),onClick:f(L=>l.changeSelectedProgram(c),["stop"])},[n("span",q,d(l.programList.length>1?s.title:"Programm"),1)],10,j)]))),128)),l.hasShows?(r(),a("li",G,[n("button",{class:u(i.activePanel==="shows"?"--active":""),onClick:t[0]||(t[0]=f(s=>l.showShowsPanel(),["stop"]))},"Sendungen",2)])):g("",!0)]),n("div",K,[n("div",{class:u(["panel",i.activePanel==="schedule"?"--active":""])},[n("div",O,[n("ul",Q,[(r(!0),a(_,null,h(l.currentProgramModel.program,(s,c)=>(r(),a("li",{key:c},[n("button",{class:u(c===i.selectedDay?"--active":""),onClick:f(L=>l.changeSelectedDay(c),["stop"])},[n("span",null,d(e.$filters.firstNLetters(s.label,2)),1),n("span",W,d(l.desktopDate(s)),1)],10,U)]))),128))]),n("div",X,[n("div",Y,[l.showShowAllButton?(r(),a("button",{key:0,onClick:t[1]||(t[1]=(...s)=>l.showShowAllAction&&l.showShowAllAction(...s)),class:"idvl_schedule-list__show-all"},[...t[2]||(t[2]=[n("span",{class:"idvl_schedule-list__show-all__label"},"Ãltere Sendungen anzeigen",-1),n("span",{class:"iconSet"},"unfold_more",-1)])])):g("",!0),(r(!0),a(_,null,h(l.showsForSelectedDay,s=>(r(),a("div",{class:u(["idvl_schedule-entry",s.thumb?"with-thumb":""]),id:"".concat(l.getAnchor(s)),"data-timestamp":l.getTimeStamp(s.from),key:l.getTimeStamp(s.from)+"_"+i.selectedDay},[n("span",ee,[t[3]||(t[3]=n("span",{class:"time-icon"},null,-1)),n("span",te,d(l.getTimeLabel(s.from,s.to,s.offset)),1),t[4]||(t[4]=n("br",null,null,-1))]),n("div",ne,[n("div",se,[s.thumb?(r(),y(p,{key:0,fill:!0,image:s.thumb},null,8,["image"])):g("",!0)]),n("div",le,[n("h3",null,d(s.title),1),n("p",{innerHTML:s.description},null,8,oe),s.link?(r(),y(w,{key:0,class:"button",url:s.link},{default:H(()=>[...t[5]||(t[5]=[n("span",{class:"button__label"},[n("span",{class:"button__text"},"Zur Sendung")],-1)])]),_:1},8,["url"])):g("",!0)])])],10,$))),128))])])])],2),n("div",{class:u(["panel",i.activePanel==="shows"?"--active":""])},[n("div",re,[n("div",ie,[(r(!0),a(_,null,h(l.currentProgramModel.all_shows,s=>(r(),y(J(l.thumbNavigationLink),{url:s.link,image:s.thumb,label:s.title,key:s.link},null,8,["url","image","label"]))),128))])])],2)])],2)}const me=P(R,[["render",ae]]);export{me as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.