(window.webpackJsonpNewland_Toubiz_Poi_Neos=window.webpackJsonpNewland_Toubiz_Poi_Neos||[]).push([[108],{VjoN:function(t,e,a){"use strict";a.d(e,"b",(function(){return s})),a.d(e,"a",(function(){return i}));var n=a("7yoQ");function s(t){return encodeURIComponent(Object(n.b)(JSON.stringify(t)))}const i={created(){for(const t of this.$options.urlState)this.restoreStateFromUrl(t),this.$watch(t,e=>this.saveStateToUrl(t,e),{deep:!0})},methods:{saveStateToUrl(t,e=this[t]){const a=Object.assign({},this.$route.query);a[t]=s(e),this.$router.push({name:this.$route.name,query:a}).catch(t=>{if(!(""+t.message).includes("redundant navigation"))throw t})},restoreStateFromUrl(t){if(!this.$route.query[t])return null;try{const e=function(t){return JSON.parse(Object(n.a)(decodeURIComponent(t)))}(this.$route.query[t]);return this.$set(this,t,e),e}catch(e){return console.warn(`Could not restore state ${t} from URL parameter ${t}`,e),null}}}}},s3mq:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"tb-w-events-at-this-location"},[t.loading?a("tb-w-loader"):t.eventsAtThisLocation.length?a("tb-w-section",{scopedSlots:t._u([{key:"content",fn:function(){return[a("tb-w-slider",[t._l(t.eventsAtThisLocation.slice(0,6),(function(e){return a("tb-w-slider-item",{key:e.id},[a("tb-w-teaser-card",{attrs:{background:t.buildImageUri(e.id,"event",[null,376]),href:t.buildUrl({name:"event.detail",params:{id:e.id}}),type:"stacked"},scopedSlots:t._u([{key:"labels",fn:function(){return[a("span",[t._v(t._s(t.getDatesToDisplay(e)))])]},proxy:!0},{key:"topline",fn:function(){return[t._v("\n                            "+t._s(e.category.name)+"\n                        ")]},proxy:!0}],null,!0)},[t._v(" "),t._v("\n\n                        "+t._s(e.name)+"\n                    ")])],1)})),t._v(" "),t.eventsAtThisLocation.length>6?a("tb-w-show-all",{attrs:{href:t.buildUrl({name:"event.list",query:{params:t.getEventLocationFilterParams(t.article.id)}})}},[t._v("\n                    "+t._s(t.$t("message.allEvents"))+"\n                ")]):t._e()],2)]},proxy:!0}])},[t._v("\n        "+t._s(t.$t("message.events"))+"\n\n        ")]):t._e()],1)};n._withStripped=!0;var s=a("VjoN"),i=a("vqf1"),r=a("6dQ1"),o={name:"TbWArticleDetailEventsAtThisLocation",props:{article:{type:Object,required:!0}},mixins:[i.a],data:()=>({loading:!0,eventsAtThisLocation:[]}),async created(){if(!Object(r.a)()){const t=await this.articleRepository.fetch(this.article.id+"/eventsAtThisLocation",{filter:{clientIncludingManaged:"current"},language:this.$store.state.language});this.eventsAtThisLocation=t.payload,this.loading=!1}},methods:{getEventLocationFilterParams:t=>Object(s.b)({filter:{location:[t]}})}},l=a("KHd+"),c=Object(l.a)(o,n,[],!1,null,null,null);c.options.__file="node_modules/@newland/toubiz-widget/src/components/article-detail/tb-w-article-detail-events-at-this-location.vue";e.default=c.exports},vqf1:function(t,e,a){"use strict";var n=a("g8pp"),s=a("N8I4"),i=a("sdSa");e.a={methods:{getDatesToDisplay:t=>t.firstDate.id===t.lastDate.id?Object(n.a)(new Date(t.firstDate.date),"d.M.Y"):function(t,e){Object(i.a)(2,arguments);var a=Object(s.a)(t),n=Object(s.a)(e);return a.getFullYear()===n.getFullYear()}(new Date(t.firstDate.date),new Date(t.lastDate.date))?`${Object(n.a)(new Date(t.firstDate.date),"d.M.")} - ${Object(n.a)(new Date(t.lastDate.date),"d.M.Y")}`:`${Object(n.a)(new Date(t.firstDate.date),"d.M.Y")} - ${Object(n.a)(new Date(t.lastDate.date),"d.M.Y")}`}}}}]);