1import{j as s,u as R,e as k,r as o}from"./components-DnchwV6p.js";import{o as g,a as w}from"./imageUtils-BhEIwvCB.js";import{c as x,e as d,d as T,u as W}from"./blogs-D72JHPRX.js";import{G as X}from"./blogs-D72JHPRX.js";import{W as N}from"./WvLink-2yczwrc_.js";import{m as $}from"./meta-AH_HhgjY.js";import"./exports-DtI854OP.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"99f1f37daa57ff822cb85b50dd6ead78faae7cfb"},e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(r){for(var a=1;a<arguments.length;a++){var t=arguments[a];if(t!=null)for(var c in t)t.hasOwnProperty(c)&&(r[c]=t[c])}return r}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:wovar-webshop":!0});var l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="9c834219-a176-4d08-92ea-8608bd5b91e6",e._sentryDebugIdIdentifier="sentry-dbid-9c834219-a176-4d08-92ea-8608bd5b91e6")}catch{}})();const A=({imageUrl:e,imageAlt:l,wovar:r,blog:a,subtitle:t})=>s.jsxs("section",{className:"news-header mb-3",children:[s.jsx("div",{className:"img img__absolute",children:s.jsx("img",{src:g(e),alt:l})}),s.jsxs("div",{className:"container py-4 py-lg-5 d-flex flex-column justify-content-center align-items-center",children:[s.jsxs("h1",{className:"heading sans-serif lg inverted mb-0",children:[s.jsx("strong",{children:r})," ",a]}),s.jsx("p",{children:t})]})]}),C=({readMore:e,popularBlogTitle:l,popularBlogPosts:r})=>{const a=x();return s.jsx("div",{className:"popularblogs",children:s.jsxs("div",{className:"popularblogs__inner",children:[s.jsx("h2",{className:"heading mdl strong underlined left py-2 mb-2 mx-3",children:l}),s.jsx("div",{className:"popularblogpost__wrapper",children:r.length>0&&r.map(t=>{var c,i,m,u,h;return s.jsxs("a",{href:a(`/${t.uid}/`),className:"popularblogpost px-3",children:[s.jsx("img",{src:g(((i=(c=t.data)==null?void 0:c.image)==null?void 0:i.url)||""),alt:((u=(m=t.data)==null?void 0:m.image)==null?void 0:u.alt)||"",className:"popularblogpost__img",width:"80px",height:"80px"}),s.jsxs("div",{className:"popularblogpost__content",children:[s.jsx("h6",{className:"popularblogpost__title",children:d((h=t.data)==null?void 0:h.title)}),s.jsx("p",{className:"popularblogpost__date","data-icon-after":"ï»",children:e})]})]},t.uid)})})]})})},F=({blogPost:e})=>{var a,t;const l=x(),{locale:r}=T();return s.jsx("article",{className:"newsitem ",children:s.jsxs(N,{to:l(`/${e.uid}/`),className:"double",children:[s.jsx("span",{className:"image img img__absolute",children:s.jsx("img",{src:g(e.data.image.url||""),alt:e.data.image.alt||""})}),s.jsxs("span",{className:"date",children:[s.jsx("strong",{children:(a=w(e.data.date_posted))==null?void 0:a.toLocaleDateString(r,{day:"2-digit"})})," ",(t=w(e.data.date_posted))==null?void 0:t.toLocaleDateString(r,{month:"short"})]}),s.jsxs("span",{className:"overlay",children:[s.jsx("h4",{children:d(e.data.title)}),d(e.data.short_introduction),"...."]}),s.jsx("button",{type:"button",className:"btn btn-warning","data-icon-after":"ï»"})]})})},q=({data:e})=>{const l=$({data:e})??[],r=(e==null?void 0:e.blogSchema)!=null?[{"script:ld+json":e.blogSchema}]:[];return[...l,...r]},J=()=>{var _;const{blogPage:e,blogPostList:l,popularBlogPosts:r}=R(),a=k(),{$pt:t}=W(),c=x(),[i,m]=o.useState(l),[u,h]=o.useState(0),[j,y]=o.useState(0),[b,L]=o.useState(null),[E,p]=o.useState(!0),[S,B]=o.useState(2),M=o.useCallback(n=>{n!==null&&L(n.getBoundingClientRect().height)},[i.results.length]);return o.useEffect(()=>{const n=()=>{y(window.innerHeight),h(window.scrollY)};return typeof window<"u"&&window.addEventListener("scroll",n),()=>{typeof window<"u"&&window.removeEventListener("scroll",n)}},[]),o.useEffect(()=>{!E||!b||j+u+100<b-1500||(a.load(`/blog?index&page=${S}`),p(!1))},[j,u,a]),o.useEffect(()=>{var n,v;if(a.data&&((v=(n=a.data)==null?void 0:n.blogPostList)==null?void 0:v.results.length)===0){p(!1);return}if(a.data&&a.data.blogPostList.results.length>0){const{results:D,...I}=a.data.blogPostList;m(({results:f,...H})=>({results:[...f,...D],...H,...I})),B(f=>f+1),p(!0)}},[(_=a.data)==null?void 0:_.blogPostList]),s.jsx("section",{ref:M,className:"subpage",children:s.jsxs("div",{className:"container",children:[s.jsxs("div",{className:"breadcrumbs py-3 mb-3",children:[s.jsx(N,{to:c("/"),className:"news first","data-icon-before":"ïº",children:t("breadcrumbs_label_home")}),s.jsx("i",{"data-icon-after":"ï"}),s.jsxs("span",{className:"news active","data-icon-before":"ïº",children:[s.jsx("span",{className:""}),t("breadcrumbs_label_blog")]})]}),s.jsx("div",{className:"row",children:s.jsxs("article",{className:"col content mb-3 mb-lg-5 blogpage px-0 px-lg-3",children:[s.jsx(A,{imageUrl:(e==null?void 0:e.data.banner_image.url)??"",imageAlt:(e==null?void 0:e.data.banner_image.alt)??"",wovar:d(e==null?void 0:e.data.banner_title_wovar)??"",blog:d(e==null?void 0:e.data.banner_title_blog)??"",subtitle:d(e==null?void 0:e.data.banner_sub_title)??""}),s.jsx("section",{className:"blogpage__overview",children:s.jsxs("div",{className:"grid-container",children:[s.jsx(C,{readMore:d(e==null?void 0:e.data.read_more)??"",popularBlogTitle:d(e==null?void 0:e.data.popular_blog_title)??"",popularBlogPosts:r}),(i==null?void 0:i.results.length)>0&&(i==null?void 0:i.results.map(n=>s.jsx(F,{blogPost:n},n==null?void 0:n.uid))),s.jsx("div",{className:"loader-container",children:a.state==="loading"&&s.jsxs("div",{className:"lds-ellipsis",children:[s.jsx("div",{}),s.jsx("div",{}),s.jsx("div",{}),s.jsx("div",{})]})})]})})]})})]})})};export{X as ErrorBoundary,J as default,q as meta}; 2//# sourceMappingURL=blog-v31GQAl3.js.map
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.