(window.webpackJsonpNewland_Toubiz_Poi_Neos=window.webpackJsonpNewland_Toubiz_Poi_Neos||[]).push([[292],{"7yoQ":function(t,e,n){"use strict";(function(t){n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return a}));var r=n("6dQ1");function i(e){return Object(r.b)()?t.from(e,"utf-8").toString("base64"):btoa(e)}function a(e){return Object(r.b)()?t.from(e,"base64").toString("utf-8"):atob(e)}}).call(this,n("tjlA").Buffer)},Hzcg:function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}));var r=n("zGJO");function i(t,e){return null==t||Number.isNaN(parseFloat(t))?"":(t.toString().includes(",")&&(t=t.toString().replaceAll(",",".")),(t=parseFloat(t))<1e3?"en"===e?t+" m":Object(r.a)(t)+" m":(t=parseInt(t,10))<1e4?"en"===e?Math.round(t/100)/10+" km":Object(r.a)(Math.round(t/100)/10)+" km":"en"===e?Math.round(t/1e3)+" km":Object(r.a)(Math.round(t/1e3))+" km")}function a(t,e,n=!0){if(null==t||Number.isNaN(parseFloat(t)))return"";const i=n?" km":"";return t.toString().includes(",")&&(t=t.toString().replaceAll(",",".")),(t=parseInt(t,10))<50?"en"===e?`${Math.ceil(t/100)/10}${i}`:`${Object(r.a)(Math.ceil(t/100)/10)}${i}`:t<1e4?"en"===e?`${Math.round(t/100)/10}${i}`:`${Object(r.a)(Math.round(t/100)/10)}${i}`:"en"===e?`${Math.round(t/1e3)}${i}`:`${Object(r.a)(Math.round(t/1e3))}${i}`}},VjoN:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return a}));var r=n("7yoQ");function i(t){return encodeURIComponent(Object(r.b)(JSON.stringify(t)))}const a={created(){if(this.$router)for(const t of this.$options.urlState)this.restoreStateFromUrl(t),this.$watch(t,e=>{this.saveStateToUrl(t,e)},{deep:!0});else this.initialListFetch()},methods:{saveStateToUrl(t,e=this[t]){if(!this.$router)return;const n=Object.assign({},this.$route.query);n[t]=i(e),this.$router.replace({name:this.$route.name,query:n}).catch(t=>{if(!(""+t.message).includes("redundant navigation"))throw t})},restoreStateFromUrl(t){var e;if(this.$route.query[t])try{const n=(e=this.$route.query[t],JSON.parse(Object(r.a)(decodeURIComponent(e))));this.$set(this,t,n),"params"===t&&this.initialListFetch(n)}catch(e){console.warn(`Could not restore state ${t} from URL parameter ${t}`,e),this.initialListFetch()}else this.initialListFetch()}}}},fQ9l:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.staticGridClass?"div":"tb-w-grid",t._b({tag:"component"},"component",t.gridAttributes,!1),[t._l(t.wintersportObjectDefinitions,(function(e,r){var i;return[e.total?n("tb-w-circle-progress-teaser",{key:r,attrs:{size:"4.5","stroke-width":"3",progress:e.percentOpen,icon:e.icon,"icon-size":"2.5","open-in-new-tab":t.openInNewTab,"widget-route":null!==(i=e.relatedItems)&&void 0!==i&&i.length?t.buildWidgetRoute({name:"article.list",query:{params:t.buildListFilterParams(e.relatedItems,e.element)}}):{}},scopedSlots:t._u([{key:"statusText",fn:function(){return[e.staticUnit?[n("span",{staticClass:"font-bold"},[t._v(t._s(e.open))]),t._v("\n                    "+t._s(t.$t("message.of"))+" "+t._s(e.total)+"\n                ")]:[n("span",{staticClass:"font-bold"},[t._v(t._s(t.humanReadableKilometers(e.open,t.language,!1)))]),t._v("\n                    "+t._s(t.$t("message.of"))+" "+t._s(t.humanReadableKilometers(e.total,t.language))+"\n                ")]]},proxy:!0},{key:"title",fn:function(){return[t._v("\n                "+t._s(e.name)+"\n            ")]},proxy:!0},{key:"subline",fn:function(){return[t._v("\n                "+t._s(e.suffix)+"\n            ")]},proxy:!0}],null,!0)}):t._e()]}))],2)};r._withStripped=!0;var i=n("Hzcg"),a=n("VjoN"),s=n("xBaG"),o={name:"TbWWintersportStatisticsGrid",props:{wintersportObjectDefinitions:{type:Array,required:!0},staticGridClass:{type:String,default:null},openInNewTab:{type:Boolean,default:!1}},computed:{...Object(s.e)(["serializedConfiguration","language"]),gridAttributes(){return this.staticGridClass?{class:"grid gap-4 "+this.staticGridClass}:{columns:{xs:1,sm:1,md:2,lg:2,xl:2}}}},methods:{buildListFilterParams(t,e){var n,r,i;return Object(a.b)({resetAccumulatedListPayload:!0,predefinedParams:{apiQueryState:{clientIncludingManaged:"",filter:{element:e,id:t.map(t=>t.id)},sorting:{property:(null===(n=this.serializedConfiguration)||void 0===n||null===(r=n.query)||void 0===r||null===(i=r.sorting)||void 0===i?void 0:i.property)||"name"}}},apiQueryState:{filter:{dynamicFields:{}}},guiQuery:{isSecondaryList:!0}})},humanReadableKilometers:i.b},i18n:{fallbackLocale:"en",silentFallbackWarn:"undefined"==typeof window,messages:{de:{message:{of:"von"}},en:{message:{of:"of"}}}}},u=n("KHd+"),l=Object(u.a)(o,r,[],!1,null,null,null);e.default=l.exports},zGJO:function(t,e,n){"use strict";function r(t){return Number.isInteger(t)?t.toString():t?t.toString().replaceAll(".",","):""}n.d(e,"a",(function(){return r}))}}]);