1import{p as I,B as j,r as L,o as M,a as r,b as d,d as e,n as h,h as k,F as g,i as m,t as i,k as w,l as v,_ as P,g as T,j as z,J as S,m as y,P as f,z as D}from"./BOSKlljY.js";import{_ as C}from"./YBrQkA9r.js";const B={class:"bg-[#D2DCE5]"},N={class:"container max-w-[1440px]"},E=["href","onClick"],H={class:"w-max font-dax text-xl uppercase",style:{"user-select":"none"}},R={__name:"SectionBlogHero",props:{categories:Object},setup(c){const p=j(),u=L(null),_=()=>{const o=u.value;let t=!1,s,l;o.addEventListener("mousedown",n=>{t=!0,o.classList.add("active"),s=n.pageX-o.offsetLeft,l=o.scrollLeft}),o.addEventListener("mouseleave",()=>{t=!1,o.classList.remove("active")}),o.addEventListener("mouseup",()=>{t=!1,o.classList.remove("active")}),o.addEventListener("mousemove",n=>{if(!t)return;n.preventDefault();const x=(n.pageX-o.offsetLeft-s)*1;o.scrollLeft=l-x})};return M(()=>{_()}),(o,t)=>(r(),d(g,null,[t[2]||(t[2]=e("div",{class:"container max-w-[1440px]"},[e("h1",{class:"py-6 text-center text-4xl font-bold text-productblue lg:py-12 lg:text-5xl"}," Blog de finanzas, bolsa e inversiones ")],-1)),e("div",B,[e("div",N,[e("div",{class:"flex h-[120px] flex-nowrap gap-4 overflow-scroll xxxl:justify-center",id:"categories-container",ref_key:"scrollContainer",ref:u},[e("div",{onClick:t[0]||(t[0]=s=>o.selectCategory("")),class:h(["my-auto h-fit cursor-pointer rounded-full px-4 py-2 text-white",k(p).params.categoryId?"bg-productblue":"bg-superlightblue"])},t[1]||(t[1]=[e("a",{href:"/blog/",class:"w-max font-dax text-xl uppercase",style:{"user-select":"none"}}," TODO ",-1)]),2),(r(!0),d(g,null,m(c.categories,s=>(r(),d("a",{href:`/blog/categoria/${s.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(" ","-")}/`,onClick:l=>o.selectCategory(s),class:h(["my-auto h-fit cursor-pointer rounded-full px-4 py-2 text-white",k(p).params.categoryId===s.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(" ","-")?"bg-superlightblue":"bg-productblue"])},[e("p",H,i(s),1)],10,E))),256))],512)])])],64))}},Se=I(R,[["__scopeId","data-v-2ea2b725"]]),O=""+new URL("posts-destacados-bg.CSSi6ZvC.png",import.meta.url).href,F=""+new URL("posts-destacados-mobile-bg.DtX80nTf.png",import.meta.url).href,X={class:"container max-w-[1440px]"},A={class:"flex cursor-pointer flex-col py-8 lg:flex-row-reverse lg:gap-[3rem] xxxl:px-12"},V={class:"h-[300px] w-full lg:h-[400px] lg:w-1/2"},U=["src"],W={class:"lg:flex lg:w-1/2 lg:flex-col lg:justify-between lg:gap-8"},J={class:"pt-4 font-dax text-4xl font-semibold lg:text-5xl"},Z=["innerHTML"],q={class:"mb-2 mt-4 flex justify-between border-t border-productblue pt-4"},G={class:"font-dax text-superlightblue"},K={class:"line-clamp-3 font-dax text-lightgrey"},Q={class:"flex"},Y={class:"font-dax text-lightgrey"},ee={class:"relative bg-productblue"},te={class:"container z-[1] flex max-w-[1440px] flex-col gap-6 py-12 lg:grid lg:grid-cols-3 lg:gap-4 xxxl:gap-20 xxxl:px-12"},se={class:"cursor-pointer overflow-hidden rounded font-dax"},oe={class:"relative z-20 pb-4 text-xl"},le={class:"text-white"},ne={class:"relative z-20 pb-4 text-3xl font-semibold text-white"},ae={class:"relative bg-white p-4"},ie=["innerHTML"],re={class:"mb-2 mt-4 flex justify-between border-t border-productblue pt-4"},ce={class:"font-dax text-superlightblue"},de={class:"font-dax text-lightgrey"},ue={class:"flex"},pe={class:"font-dax text-lightgrey"},De={__name:"SectionBlogDestacados",props:{initialPosts:Object},setup(c){const p=t=>{const l=u(t);return Math.ceil(l/200)},u=t=>t.trim().split(/\s+/).length,{selectContent:_}=z(),o=t=>{const s={modulo:"cuerpo",titulo_contenido:t.post_title,categoria_contenido:t.categories[0].name,autor_contenido:t.autor_name};_(s)};return(t,s)=>{const l=P;return r(),d(g,null,[e("div",X,[w(l,{to:`${c.initialPosts[0].uri}`,onClick:s[0]||(s[0]=n=>o(c.initialPosts[0]))},{default:v(()=>[e("div",A,[e("div",V,[e("img",{src:c.initialPosts[0].featured_image_url,class:"h-full w-full object-cover"},null,8,U)]),e("div",W,[e("h3",J,i(c.initialPosts[0].post_title),1),e("div",{class:"line-clamp-2 font-dax text-lg font-normal lg:text-xl",innerHTML:c.initialPosts[0].post_content},null,8,Z),e("div",q,[e("p",G,i(c.initialPosts[0].autor_name),1),e("p",K,i(c.initialPosts[0].post_date),1),e("div",Q,[s[1]||(s[1]=e("img",{src:C,class:""},null,-1)),e("p",Y,i(p(c.initialPosts[0].post_content))+" min ",1)])])])])]),_:1},8,["to"])]),e("div",ee,[s[4]||(s[4]=e("div",{class:"absolute inset-0 z-[0] hidden md:block"},[e("img",{src:O,class:"h-[100%] w-[100%]"})],-1)),s[5]||(s[5]=e("div",{class:"absolute inset-0 z-[0] block md:hidden"},[e("img",{src:F,class:"h-[100%] w-[100%]"})],-1)),e("div",te,[(r(!0),d(g,null,m(c.initialPosts.slice(1,4),n=>(r(),d("div",null,[w(l,{to:n.uri,onClick:a=>o(n)},{default:v(()=>[e("div",se,[e("div",{class:"relative inset-0 flex h-[300px] flex-col justify-end bg-cover bg-center p-4",style:T({backgroundImage:`url(${n.featured_image_url})`})},[s[2]||(s[2]=e("div",{class:"absolute inset-0 z-10 bg-gradient-to-t from-productblue to-transparent"},null,-1)),e("div",oe,[(r(!0),d(g,null,m(n.categories,a=>(r(),d("p",le,i(a.name),1))),256))]),e("p",ne,i(n.post_title),1)],4),e("div",ae,[e("div",{class:"line-clamp-4 font-dax text-lg font-normal",innerHTML:n.post_content},null,8,ie),e("div",re,[e("p",ce,i(n.autor_name),1),e("p",de,i(n.post_date),1),e("div",ue,[s[3]||(s[3]=e("img",{src:C,class:""},null,-1)),e("p",pe,i(p(n.post_content))+" min ",1)])])])])]),_:2},1032,["to","onClick"])]))),256))])])],64)}}},ge={class:"container flex max-w-[1440px] flex-col gap-6 py-12 lg:grid lg:grid-cols-3 lg:gap-4 xxxl:gap-20 xxxl:px-12",id:"paginated-posts-container"},xe={class:"cursor-pointer overflow-hidden rounded font-dax shadow-2xl"},_e={class:"relative bg-white p-4"},fe={class:"relative z-20 flex gap-4 pb-2 text-lg"},ve={class:"text-productblue"},me={class:"relative z-20 pb-4 text-2xl font-semibold lg:line-clamp-2 lg:h-[70px]"},be=["innerHTML"],he={class:"mb-2 mt-4 flex justify-between border-t border-productblue pt-4"},we={class:"font-dax text-superlightblue"},$e={class:"font-dax text-lightgrey"},ye={class:"flex"},Le={class:"font-dax text-lightgrey"},Be={__name:"SectionBlogPagedPosts",props:{posts:Object},setup(c){const p=o=>{const s=u(o);return Math.ceil(s/200)},u=o=>o.trim().split(/\s+/).length,{selectContent:_}=z();return(o,t)=>{const s=P;return r(),d("div",ge,[(r(!0),d(g,null,m(c.posts,l=>(r(),d("div",null,[w(s,{to:l.uri,onClick:n=>k(_)(l)},{default:v(()=>[e("div",xe,[e("div",{class:"relative inset-0 flex h-[300px] flex-col justify-end bg-cover bg-center p-4",style:T({backgroundImage:`url(${l.featured_image_url})`})},null,4),e("div",_e,[e("div",fe,[(r(!0),d(g,null,m(l.categories,n=>(r(),d("p",ve,i(n.name),1))),256))]),e("p",me,i(l.post_title),1),e("div",{class:"line-clamp-4 font-dax text-lg font-normal",innerHTML:l.post_content},null,8,be),e("div",he,[e("p",we,i(l.autor_name),1),e("p",$e,i(l.post_date),1),e("div",ye,[t[0]||(t[0]=e("img",{src:C,class:""},null,-1)),e("p",Le,i(p(l.post_content))+" min ",1)])])])])]),_:2},1032,["to","onClick"])]))),256))])}}},ke={class:"container hidden py-12 lg:block"},Ce={class:"pagination flex flex-wrap justify-center gap-4 font-dax"},Pe={class:"relative flex h-[100px] justify-center gap-4 py-8 font-dax lg:hidden"},je=["disabled"],Te={class:"flex h-full items-center gap-2"},ze=["disabled"],Ne={__name:"SectionBlogPagination",props:{totalPages:Object},setup(c){const p=c,u=j(),_=S(),o=L(p.totalPages),t=L(parseInt(u.params.id)||1),s=a=>{_.push(`/blog${u.params.categoryId!==void 0?`/categoria/${u.params.categoryId}`:""}/page/${a}/`)},l=()=>{t.value>1&&s(t.value-1)},n=()=>{t.value<o.value&&s(t.value+1)};return(a,x)=>{const $=P;return r(),d(g,null,[e("div",ke,[e("div",Ce,[w($,{class:h(["border border-productblue px-4 py-2 text-lg hover:bg-superlightblue hover:text-white",{"pointer-events-none opacity-50":t.value===1}]),to:t.value>1?`/blog${(a._.provides[f]||a.$route).params.categoryId!==void 0?`/categoria/${(a._.provides[f]||a.$route).params.categoryId}`:""}/page/${t.value-1}/`:"#"},{default:v(()=>x[0]||(x[0]=[y(" « Anterior ")])),_:1},8,["to","class"]),(r(!0),d(g,null,m(o.value,b=>(r(),D($,{key:b,to:`/blog${(a._.provides[f]||a.$route).params.categoryId!==void 0?`/categoria/${(a._.provides[f]||a.$route).params.categoryId}`:""}/page/${b}/`,class:h([{active:b===t.value},{"bg-superlightblue text-white":b===t.value},"border border-productblue px-4 py-2 text-lg hover:bg-superlightblue hover:text-white"])},{default:v(()=>[y(i(b),1)]),_:2},1032,["to","class"]))),128)),w($,{class:h(["border border-productblue px-4 py-2 text-lg hover:bg-superlightblue hover:text-white",{"pointer-events-none opacity-50":t.value===o.value}]),to:t.value<o.value?`/blog${(a._.provides[f]||a.$route).params.categoryId!==void 0?`/categoria/${(a._.provides[f]||a.$route).params.categoryId}`:""}/page/${t.value+1}/`:"#"},{default:v(()=>x[1]||(x[1]=[y(" Siguiente » ")])),_:1},8,["to","class"])])]),e("div",Pe,[e("button",{class:"h-full border border-productblue px-4 text-base hover:bg-superlightblue hover:text-white",onClick:l,disabled:t.value===1}," « Anterior ",8,je),e("div",Te,[e("p",null,i(t.value),1),x[2]||(x[2]=e("p",null,"de",-1)),e("p",null,i(o.value),1)]),e("button",{class:"h-full border border-productblue px-4 text-base hover:bg-superlightblue hover:text-white",onClick:n,disabled:t.value===o.value}," Siguiente » ",8,ze)])],64)}}};export{Se as _,De as a,Be as b,Ne as c};
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.