1import{_ as j}from"./BBQUNM4Y.js";import{d as I,o as a,c,O as z,u as o,b as E,a as s,I as R,t as v,v as k,J as H,s as w,r as x,R as q,_ as L,h as F,n as U,k as V,y as G,p as X,S as J,T as K,U as Q,e as _,F as $,E as M,K as b,q as W}from"./3iKRmllS.js";import{f as Y}from"./4ztki_BW.js";import{C as Z}from"./dTH-VGQf.js";import{R as S}from"./C4C4PCF0.js";import{T as C}from"./DPHkPacX.js";import{g as ee}from"./B-Hlxotg.js";import{u as te}from"./CVECHu0s.js";const oe=["src"],se={style:{position:"absolute",left:"0rem",top:"40%",display:"flex",width:"52%","padding-left":"2.5rem","padding-right":"2.5rem","flex-direction":"row"}},ae=I({__name:"OGImage.takumi",props:{title:{},showImage:{type:Boolean}},setup(e){const n=e,g=["/og_images/blog-templates/motive-og-woo-1.png","/og_images/blog-templates/motive-og-woo-2.png","/og_images/blog-templates/motive-og-woo-3.png","/og_images/blog-templates/motive-og-woo-4.png","/og_images/blog-templates/motive-og-woo-5.png"];function p(t){let l=0;for(let r=0;r<t.length;r++)l=(l<<5)-l+t.charCodeAt(r),l|=0;return Math.abs(l)}const u=k(()=>{const t=p(n.title||"");return g[t%g.length]}),i=k(()=>{const t=(n.title||"").length;return t<=45?"text-4xl":t<=75?"text-3xl":t<=105?"text-2xl":"text-xl"});return(t,l)=>(a(),c("div",{style:z([{"max-height":"35rem",width:"100%",position:"relative",overflow:"hidden"},e.showImage?"":`background-image: url('${o(u)}'); background-size: cover; background-position: center;`]),class:"bg-black-500"},[e.showImage?(a(),c("img",{key:0,src:o(u),alt:"Motive blog social image background",style:{"max-height":"35rem",width:"100%","object-fit":"cover"},"data-test":"og-image-image"},null,8,oe)):E("",!0),s("div",se,[s("p",{class:R([o(i),{"line-clamp-4":e.showImage}]),style:{width:"100%","overflow-wrap":"break-word","text-align":"left","font-weight":"700","line-height":"1.25",color:"#000","font-family":"Poppins, sans-serif"}},v(e.title),3)])],4))}}),le=Object.assign(ae,{__name:"OGImageTakumi"}),ne=["src","alt"],ie={class:"motw-post-summary__category"},re={class:"motw-post-summary__title"},me=["innerHTML"],ce=["innerHTML"],ge={key:2,class:"motw-post-summary__subtitle"},ue=I({__name:"post-summary",props:{post:{type:Object,required:!0},featured:{type:Boolean,default:!1}},setup(e){const n={EXTERNAL_REFERENCE:"external-reference"},g=H();return(p,u)=>{const i=q;return a(),c("article",{class:R(["motw-post-summary",{"motw-post-summary--featured":e.featured}])},[e.post.metaImage&&e.post.metaImage!==""?(a(),c("img",{key:0,src:e.post.metaImage,alt:e.post.title,loading:"lazy",class:"motw-post-summary__image"}
1,null,8,ne)):(a(),w(le,{key:1,title:e.post.title,"show-image":"",class:"max-h-140 w-full"},null,8,["title"])),s("p",ie,v(e.post.category),1),s("h2",re,[e.post.type===n.EXTERNAL_REFERENCE?(a(),w(i,{key:0,href:e.post.link,target:"_blank"},{default:x(()=>[s("p",{innerHTML:e.post.title},null,8,me)]),_:1},8,["href"])):(a(),w(i,{key:1,to:o(g)(`/${e.post.type}/${e.post.slug}`)},{default:x(()=>[s("p",{innerHTML:e.post.title},null,8,ce)]),_:1},8,["to"]))]),e.post.publishDate?(a(),c("p",ge,v(o(Y)(new Date(e.post.publishDate),p.$i18n.locale)),1)):E("",!0)],2)}}}),_e=Object.assign(L(ue,[["__scopeId","data-v-0c5c71cd"]]),{__name:"BlogPostSummary"}),pe={class:"motw-blog"},de={class:"motw-wrapped-content motw-wrapped-content--centered motw-blog__content"},he=I({__name:"index",async setup(e){let n,g;const{isSmallTabletOrLess:p}=te(),{public:{baseUrl:u}}=F(),{t:i,locale:t}=U();V({meta:ee(i("blog.list.meta.title"),i("blog.list.meta.description"),i("blog.list.meta.url",{base:u}),G(u,"/og_images/blog.jpg"),i("blog.list.meta.imageAlt"))});const{data:l}=([n,g]=X(()=>W(`${t.value}-blog-list`,()=>$fetch("/api/blog",{query:{locale:t.value,limit:10,offset:0}}))),n=await n,g(),n),r=b([]),d=b(!0),h=b(!1),T=b(null);J(()=>{l.value?.posts&&(r.value=l.value.posts,d.value=l.value.hasMore)});const B=k(()=>r.value.map(m=>({...m,type:"blog"})));async function P(){if(!(!d.value||h.value)){h.value=!0;try{const m=await $fetch("/api/blog",{query:{locale:t.value,limit:10,offset:r.value.length}});m.posts.length>0?(r.value=[...r.value,...m.posts],d.value=m.hasMore):d.value=!1}finally{h.value=!1}}}const{stop:D}=K(T,m=>{m[0]?.isIntersecting&&d.value&&!h.value&&P()},{rootMargin:"200px"});return Q(()=>{D()}),(m,y)=>{const N=j,O=_e;return a(),c("main",pe,[_(N,{class:"motw-blog__background-shapes"},{default:x(()=>[_(o(C),{class:"motw-blog__shape motw-blog__shape--triangle-one"}),_(o(S),{class:"motw-blog__shape motw-blog__shape--ring-one"}),_(o(Z),{class:"motw-blog__shape motw-blog__shape--circle"}),_(o(C),{class:"motw-blog__shape motw-blog__shape--triangle-two"}),_(o(S),{class:"motw-blog__shape motw-blog__shape--ring-two"})]),_:1}),s("div",de,[(a(!0),c($,null,M(o(B),(f,A)=>(a(),w(O,{key:f.slug,class:"motw-blog__post-summary",post:f,featured:A===0&&!o(p)},null,8,["post","featured"]))),128)),o(h)?(a(),c($,{key:0},M(2,f=>s("div",{key:`skeleton-${f}`,class:"motw-blog__post-summary motw-blog__skeleton"},[...y[0]||(y[0]=[s("div",{class:"motw-blog__skeleton-image"},null,-1),s("div",{class:"motw-blog__skeleton-category"},null,-1),s("div",{class:"motw-blog__skeleton-title"},null,-1),s("div",{class:"motw-blog__skeleton-subtitle"},null,-1)])])),64)):E("",!0),s("div",{ref_key:"sentinelRef",ref:T,class:"motw-blog__sentinel"},null,512)])])}}}),Ee=L(he,[["__scopeId","data-v-6d3ead08"]]);export{Ee 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.