sass-template-common 0.1.15 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6118,7 +6118,7 @@ const wt = (e) => {
6118
6118
  {
6119
6119
  href: i.link ? i.link : void 0,
6120
6120
  target: i.target,
6121
- className: re.menuItem,
6121
+ className: `${re.menuItem} footer-menu-item`,
6122
6122
  "aria-label": i.description,
6123
6123
  children: i.description
6124
6124
  },
@@ -9584,7 +9584,7 @@ async function w2(e) {
9584
9584
  ), d = await A2(d, l), d = m2(d), d = h2(d);
9585
9585
  const c = t.main.sources ?? [];
9586
9586
  return /* @__PURE__ */ m("div", { className: $t.content, children: [
9587
- o !== "liveblogs" || e.showHeaderImage ? t.hascontent?.hasgalleryimages ? /* @__PURE__ */ a(
9587
+ o !== "liveblogs" && e.showHeaderImage ? t.hascontent?.hasgalleryimages ? /* @__PURE__ */ a(
9588
9588
  js,
9589
9589
  {
9590
9590
  newsformated: t,
@@ -38,7 +38,7 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
38
38
  c0.6,0.2,1.1,0.2,1.5,0.1c0.5-0.1,1.4-0.6,1.6-1.1c0.2-0.5,0.2-1,0.1-1.1C19.7,17.1,19.6,17,19.4,16.9`})})})}),kt=e=>t.jsx("svg",{...e,version:"1.1",baseProfile:"tiny",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 30 30",overflow:"visible",xmlSpace:"preserve",children:t.jsx("path",{fill:"currentColor",d:"M5.9,6.1l7.1,9.8l-7.1,7.9h1.6l6.2-7l5,7h5.4l-7.5-10.3l6.6-7.4h-1.6L16,12.5l-4.6-6.4L5.9,6.1L5.9,6.1zM8.2,7.4h2.5l11,15.3h-2.5L8.2,7.4z"})}),pl=e=>t.jsxs("svg",{version:"1.1",baseProfile:"tiny",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 30 30",overflow:"visible",xmlSpace:"preserve",...e,children:[t.jsx("path",{fill:"currentColor",d:`M15,23.9c-0.7,0-7.3,0-9.2-0.6C4.6,23,3.7,22,3.2,20.8c-0.4-2-0.4-5.6-0.4-5.8c0-0.2,0-3.8,0.6-5.8C3.7,7.9,4.7,7,5.9,6.5c1.9-0.4,8.9-0.4,9.2-0.4c0.7,0,7.3,0,9.2,0.6C25.5,7,26.4,8,26.9,9.2c0,0,0,0,0,0.1c0.5,1.9,0.3,5.7,0.3,5.9
39
39
  c0,0.1,0,3.8-0.4,5.7c-0.4,1.3-1.3,2.2-2.6,2.6C22.2,23.9,15.3,23.9,15,23.9z M15.1,7.6c-2,0-7.4,0.1-8.8,0.4C6,8.1,5.1,8.5,4.8,9.5c-0.5,1.8-0.5,5.4-0.5,5.4s0,3.6,0.4,5.4c0.1,0.3,0.5,1.2,1.6,1.5c1.4,0.4,6.8,0.5,8.7,0.5c2,0,7.4-0.1,8.8-0.4
40
40
  c0.3-0.1,1.2-0.5,1.5-1.6c0.4-1.6,0.4-5.3,0.4-5.3c0-0.1,0.2-3.7-0.2-5.4c-0.1-0.4-0.5-1.3-1.6-1.6C22.5,7.7,17.1,7.6,15.1,7.6zM12.8,19.2c-0.1,0-0.3,0-0.4-0.1c-0.2-0.1-0.4-0.4-0.4-0.7v-6.9c0-0.3,0.1-0.5,0.4-0.6c0.2-0.1,0.5-0.1,0.7,0l5.9,3.4
41
- c0.2,0.1,0.4,0.4,0.4,0.6c0,0.3-0.1,0.5-0.4,0.7l-5.9,3.5C13.1,19.1,12.9,19.2,12.8,19.2z M13.6,12.9v4.3l3.7-2.2L13.6,12.9z`}),t.jsx("path",{fill:"currentColor",d:"M12.8,18.6v-6.9l5.9,3.4L12.8,18.6z"})]}),Hs=["telegram"],cn={facebook:e=>t.jsx(Vn,{...e}),instagram:e=>t.jsx(Fn,{...e}),whatsapp:e=>t.jsx(gl,{...e}),tiktok:e=>t.jsx(fl,{...e}),youtube:e=>t.jsx(pl,{...e}),x:e=>t.jsx(kt,{...e}),gnews:e=>t.jsx(hl,{...e}),podcast:e=>t.jsx(ul,{...e}),telegram:e=>t.jsx(ml,{...e})},Al=e=>{const{freeZone:n,socials:a,menu:s,customBlock:o}=e;return t.jsxs("footer",{className:oe.content,children:[t.jsxs("section",{className:oe.brandContent,children:[t.jsx(T,{href:"/","aria-label":"Ir a la home",children:t.jsx("span",{className:oe.logoStyled,children:e.logo})}),t.jsx("div",{className:oe.socialMedia,children:Object.keys(a).map(r=>a[r]?.show&&t.jsx("a",{target:"_blank",rel:"noreferrer","aria-label":a[r].title+" link",className:oe.linkSocialNetwoks,href:a[r].url,children:cn[r]({className:`${Hs.includes(r)?oe.socialNetworkIcon_stroke:oe.socialNetworkIcon} ${r==="instagram"?oe.socialInstagram:""}`})},r))})]}),t.jsxs("section",{className:oe.sectionContent,children:[t.jsx("div",{className:oe.section,children:s.filter(r=>!r.subitem).map((r,i)=>t.jsx(T,{href:r.link?r.link:void 0,target:r.target,className:oe.menuItem,"aria-label":r.description,children:r.description},i))}),t.jsx("div",{className:oe.section,children:n&&n.map((r,i)=>t.jsx(T,{href:r.link?r?.link:void 0,target:r.target,className:oe.otherItems,children:r.description},i))})]}),o&&t.jsx(t.Fragment,{children:o}),t.jsxs("section",{className:oe.copyrigth,children:[t.jsx("p",{className:oe.copyrigthText,children:e.copyrigth}),t.jsx(T,{"aria-label":"Bluestack link",href:"https://www.bluestack.la",title:"Plataforma BLUESTACK CMS (antes CMS MEDIOS)",target:"_blank",rel:"noreferrer",children:t.jsx(dl,{})})]})]})},R={content:"_content_1e93o_1",imageContent:"_imageContent_1e93o_9",width1Autor:"_width1Autor_1e93o_18",width2Autor:"_width2Autor_1e93o_22",width3Autor:"_width3Autor_1e93o_26",imageAutor:"_imageAutor_1e93o_30",imageStyled:"_imageStyled_1e93o_69",contentIconStyled:"_contentIconStyled_1e93o_70",avatarContent:"_avatarContent_1e93o_87",journalistSection:"_journalistSection_1e93o_95",journalistInfo:"_journalistInfo_1e93o_103",journalistInfoLink:"_journalistInfoLink_1e93o_104",socialNetworkSection:"_socialNetworkSection_1e93o_139",avatarStyled:"_avatarStyled_1e93o_151",article:"_article_1e93o_156",socialButton:"_socialButton_1e93o_160",facebookStyled:"_facebookStyled_1e93o_176",emailStyled:"_emailStyled_1e93o_180",xStyled:"_xStyled_1e93o_184",linkedinStyled:"_linkedinStyled_1e93o_188",whatsappStyled:"_whatsappStyled_1e93o_192",whatsappLink:"_whatsappLink_1e93o_196",clipboardButton:"_clipboardButton_1e93o_212",googleProfileButton:"_googleProfileButton_1e93o_248"},wl=e=>t.jsx("svg",{width:"13",height:"23",viewBox:"0 0 13 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t.jsx("path",{d:"M11.7376 0H8.80322C5.52359 0 3.36594 2.11766 3.36594 5.50591V8.0471H0.431531C0.172612 8.0471 0 8.21652 0 8.47064V12.113C0 12.3671 0.172612 12.5365 0.431531 12.5365H3.36594V21.7695C3.36594 22.0237 3.53855 22.1931 3.79747 22.1931H7.68125C7.94016 22.1931 8.11278 22.0237 8.11278 21.7695V12.5365H11.565C11.8239 12.5365 11.9966 12.3671 11.9966 12.113V8.47064C11.9966 8.38593 11.9102 8.21652 11.8239 8.13181C11.7376 8.0471 11.6513 7.9624 11.4787 7.9624H8.02647V5.84474C8.02647 4.82826 8.28539 4.32002 9.66629 4.32002H11.6513C11.9102 4.32002 12.0829 4.15061 12.0829 3.89649V0.508238C12.1692 0.169413 11.9966 0 11.7376 0Z",fill:"black"})}),dn=e=>t.jsx("svg",{version:"1.1",baseProfile:"tiny",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 30 30",overflow:"visible",xmlSpace:"preserve",...e,children:t.jsx("path",{fill:"currentColor",strokeWidth:"1.2656",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",d:`M10.2,8.3c0,1.1-0.9,2.1-2.2,2.1l0,0c-1.3,0-2.1-0.9-2.1-2.1c0-1.1,0.9-2.1,2.2-2.1C9.4,6.3,10.2,7.1,10.2,8.3z M6.1,23.7H10V11.9
41
+ c0.2,0.1,0.4,0.4,0.4,0.6c0,0.3-0.1,0.5-0.4,0.7l-5.9,3.5C13.1,19.1,12.9,19.2,12.8,19.2z M13.6,12.9v4.3l3.7-2.2L13.6,12.9z`}),t.jsx("path",{fill:"currentColor",d:"M12.8,18.6v-6.9l5.9,3.4L12.8,18.6z"})]}),Hs=["telegram"],cn={facebook:e=>t.jsx(Vn,{...e}),instagram:e=>t.jsx(Fn,{...e}),whatsapp:e=>t.jsx(gl,{...e}),tiktok:e=>t.jsx(fl,{...e}),youtube:e=>t.jsx(pl,{...e}),x:e=>t.jsx(kt,{...e}),gnews:e=>t.jsx(hl,{...e}),podcast:e=>t.jsx(ul,{...e}),telegram:e=>t.jsx(ml,{...e})},Al=e=>{const{freeZone:n,socials:a,menu:s,customBlock:o}=e;return t.jsxs("footer",{className:oe.content,children:[t.jsxs("section",{className:oe.brandContent,children:[t.jsx(T,{href:"/","aria-label":"Ir a la home",children:t.jsx("span",{className:oe.logoStyled,children:e.logo})}),t.jsx("div",{className:oe.socialMedia,children:Object.keys(a).map(r=>a[r]?.show&&t.jsx("a",{target:"_blank",rel:"noreferrer","aria-label":a[r].title+" link",className:oe.linkSocialNetwoks,href:a[r].url,children:cn[r]({className:`${Hs.includes(r)?oe.socialNetworkIcon_stroke:oe.socialNetworkIcon} ${r==="instagram"?oe.socialInstagram:""}`})},r))})]}),t.jsxs("section",{className:oe.sectionContent,children:[t.jsx("div",{className:oe.section,children:s.filter(r=>!r.subitem).map((r,i)=>t.jsx(T,{href:r.link?r.link:void 0,target:r.target,className:`${oe.menuItem} footer-menu-item`,"aria-label":r.description,children:r.description},i))}),t.jsx("div",{className:oe.section,children:n&&n.map((r,i)=>t.jsx(T,{href:r.link?r?.link:void 0,target:r.target,className:oe.otherItems,children:r.description},i))})]}),o&&t.jsx(t.Fragment,{children:o}),t.jsxs("section",{className:oe.copyrigth,children:[t.jsx("p",{className:oe.copyrigthText,children:e.copyrigth}),t.jsx(T,{"aria-label":"Bluestack link",href:"https://www.bluestack.la",title:"Plataforma BLUESTACK CMS (antes CMS MEDIOS)",target:"_blank",rel:"noreferrer",children:t.jsx(dl,{})})]})]})},R={content:"_content_1e93o_1",imageContent:"_imageContent_1e93o_9",width1Autor:"_width1Autor_1e93o_18",width2Autor:"_width2Autor_1e93o_22",width3Autor:"_width3Autor_1e93o_26",imageAutor:"_imageAutor_1e93o_30",imageStyled:"_imageStyled_1e93o_69",contentIconStyled:"_contentIconStyled_1e93o_70",avatarContent:"_avatarContent_1e93o_87",journalistSection:"_journalistSection_1e93o_95",journalistInfo:"_journalistInfo_1e93o_103",journalistInfoLink:"_journalistInfoLink_1e93o_104",socialNetworkSection:"_socialNetworkSection_1e93o_139",avatarStyled:"_avatarStyled_1e93o_151",article:"_article_1e93o_156",socialButton:"_socialButton_1e93o_160",facebookStyled:"_facebookStyled_1e93o_176",emailStyled:"_emailStyled_1e93o_180",xStyled:"_xStyled_1e93o_184",linkedinStyled:"_linkedinStyled_1e93o_188",whatsappStyled:"_whatsappStyled_1e93o_192",whatsappLink:"_whatsappLink_1e93o_196",clipboardButton:"_clipboardButton_1e93o_212",googleProfileButton:"_googleProfileButton_1e93o_248"},wl=e=>t.jsx("svg",{width:"13",height:"23",viewBox:"0 0 13 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t.jsx("path",{d:"M11.7376 0H8.80322C5.52359 0 3.36594 2.11766 3.36594 5.50591V8.0471H0.431531C0.172612 8.0471 0 8.21652 0 8.47064V12.113C0 12.3671 0.172612 12.5365 0.431531 12.5365H3.36594V21.7695C3.36594 22.0237 3.53855 22.1931 3.79747 22.1931H7.68125C7.94016 22.1931 8.11278 22.0237 8.11278 21.7695V12.5365H11.565C11.8239 12.5365 11.9966 12.3671 11.9966 12.113V8.47064C11.9966 8.38593 11.9102 8.21652 11.8239 8.13181C11.7376 8.0471 11.6513 7.9624 11.4787 7.9624H8.02647V5.84474C8.02647 4.82826 8.28539 4.32002 9.66629 4.32002H11.6513C11.9102 4.32002 12.0829 4.15061 12.0829 3.89649V0.508238C12.1692 0.169413 11.9966 0 11.7376 0Z",fill:"black"})}),dn=e=>t.jsx("svg",{version:"1.1",baseProfile:"tiny",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 30 30",overflow:"visible",xmlSpace:"preserve",...e,children:t.jsx("path",{fill:"currentColor",strokeWidth:"1.2656",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",d:`M10.2,8.3c0,1.1-0.9,2.1-2.2,2.1l0,0c-1.3,0-2.1-0.9-2.1-2.1c0-1.1,0.9-2.1,2.2-2.1C9.4,6.3,10.2,7.1,10.2,8.3z M6.1,23.7H10V11.9
42
42
  H6.1V23.7z M19.6,11.7c-2.1,0-3.5,2-3.5,2v-1.7h-3.9v11.8H16v-6.6c0-0.3,0-0.7,0.1-0.9c0.3-0.7,0.9-1.4,2-1.4c1.4,0,2,1.1,2,2.7v6.3
43
43
  h3.9V17C24.1,13.3,22.2,11.7,19.6,11.7z`})}),yl=e=>t.jsxs("svg",{width:"25",height:"21",viewBox:"0 0 25 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[t.jsx("path",{d:"M21.6424 1H3.33879C2.11855 1 1 2.01687 1 3.33879V17.0665C1 18.2867 2.01687 19.4053 3.33879 19.4053H21.6424C22.8626 19.4053 23.9812 18.3884 23.9812 17.0665V3.33879C23.9812 2.01687 22.8626 1 21.6424 1Z",stroke:"black",strokeWidth:"1.6"}),t.jsx("path",{d:"M21.6425 5.57591L12.5923 11.2704L3.33887 5.57591V3.33881L12.5923 8.93157L21.6425 3.33881V5.57591Z",fill:"black"})]}),bl=e=>t.jsxs("svg",{width:"24",height:"19",viewBox:"0 0 24 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[t.jsx("path",{d:"M20.8752 0.195801H2.96092C1.76664 0.195801 0.671875 1.19104 0.671875 2.48485V15.9206C0.671875 17.1149 1.66711 18.2096 2.96092 18.2096H20.8752C22.0695 18.2096 23.1643 17.2144 23.1643 15.9206V2.48485C23.1643 1.19104 22.0695 0.195801 20.8752 0.195801Z",fill:"black"}),t.jsx("path",{d:"M20.8752 4.67439L12.0176 10.2477L2.96094 4.67439V2.48486L12.0176 7.95868L20.8752 2.48486V4.67439Z",fill:"white"})]}),Cl=e=>t.jsx("svg",{width:"13",height:"22",viewBox:"0 0 13 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{className:e.className,d:"M11.6659 1H8.99942C6.01924 1 4.0586 2.9084 4.0586 5.96183V8.25191H1.39213C1.15685 8.25191 1 8.40458 1 8.63359V11.916C1 12.145 1.15685 12.2977 1.39213 12.2977H4.0586V20.6183C4.0586 20.8473 4.21545 21 4.45073 21H7.97989C8.21516 21 8.37202 20.8473 8.37202 20.6183V12.2977H11.509C11.7443 12.2977 11.9012 12.145 11.9012 11.916V8.63359C11.9012 8.55725 11.8227 8.40458 11.7443 8.32824C11.6659 8.25191 11.5875 8.17557 11.4306 8.17557H8.29359V6.26718C8.29359 5.35115 8.52887 4.89313 9.78368 4.89313H11.5875C11.8227 4.89313 11.9796 4.74046 11.9796 4.51145V1.45802C12.058 1.15267 11.9012 1 11.6659 1Z",stroke:"black",strokeWidth:"1.6"})}),vl=e=>t.jsx("svg",{width:"26",height:"25",viewBox:"0 0 22 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t.jsx("path",{d:"M10 5C9.45 5 9 5.45 9 6V9H6C5.45 9 5 9.45 5 10C5 10.55 5.45 11 6 11H9V14C9 14.55 9.45 15 10 15C10.55 15 11 14.55 11 14V11H14C14.55 11 15 10.55 15 10C15 9.45 14.55 9 14 9H11V6C11 5.45 10.55 5 10 5ZM10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM10 18C5.59 18 2 14.41 2 10C2 5.59 5.59 2 10 2C14.41 2 18 5.59 18 10C18 14.41 14.41 18 10 18Z",fill:"black"})}),_l={FaceBook:{url:e=>`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(e)}`,icon:{outline:e=>t.jsx(Cl,{className:e}),solid:e=>t.jsx(wl,{className:e})}},X:{url:e=>`https://twitter.com/intent/tweet?url=${encodeURIComponent(e)}`,icon:{outline:e=>t.jsx(kt,{className:e}),solid:e=>t.jsx(kt,{className:e})}},Whatsapp:{url:e=>`https://wa.me/?text=${encodeURIComponent(e)}`,icon:{outline:e=>t.jsx(Ms,{className:e}),solid:e=>t.jsx(Ds,{className:e})}},Email:{url:e=>`mailto:?body=${encodeURIComponent(e)}`,icon:{outline:e=>t.jsx(yl,{className:e}),solid:e=>t.jsx(bl,{className:e})}},LinkedIn:{url:e=>`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(e)}`,icon:{outline:e=>t.jsx(dn,{className:e}),solid:e=>t.jsx(dn,{className:e})}}};function Vs({noteShare:e}){const n=e&&e.url||(typeof window<"u"?window.location.href:"https://example.com");return e?t.jsxs("div",{className:R.socialNetworkSection,children:[e.options?.map(a=>{const s=_l[a];if(!s)return null;const o=e.variant==="outline"?s.icon.outline:s.icon.solid,r=s.url(n);return t.jsx(T,{href:r,target:"_blank",rel:"noopener noreferrer","aria-label":`Compartir en ${a}`,className:`${R.socialButton} ${R[`${a.toLowerCase()}Button`]??""} ${R[`${a.toLowerCase()}Styled`]}`,children:o("")},a)}),t.jsx("button",{type:"button","data-text":"Link copiado","data-active":"false","aria-label":"copy",className:[R.clipboardButton,"clipbtn-id"].join(" "),children:t.jsx(Ps,{})}),t.jsx("button",{type:"button","aria-label":"share",className:[R.clipboardButton,"sharebtn-id"].join(" "),children:t.jsx(vl,{})})]}):null}const qe={content:"_content_r1co8_1",videoContent:"_videoContent_r1co8_20",articleSection:"_articleSection_r1co8_27",title:"_title_r1co8_42",article:"_article_r1co8_27",correspondent:"_correspondent_r1co8_75",iframeStyled:"_iframeStyled_r1co8_84",contentFrame:"_contentFrame_r1co8_94"},Nl=e=>{const n=()=>e?.video.main.author?`${e?.video.main.author} - ${ye(e.video.info.date.created)}`:e?.video.main.author;return t.jsx("div",{className:qe.content,children:t.jsx(rt,{children:t.jsxs("div",{className:qe.videoContent,children:[t.jsx("p",{className:qe.title,children:e.video.main.title}),e.type==="vy"&&t.jsx("iframe",{className:qe.iframeStyled,src:`https://www.youtube.com/embed/${e.video.main.code}`,frameBorder:"0",allowFullScreen:!0}),e.type==="vf"&&t.jsx("iframe",{className:qe.iframeStyled,src:e.video.main.code,frameBorder:"0",allowFullScreen:!0}),e.type==="ve"&&t.jsx("div",{className:qe.contentFrame,dangerouslySetInnerHTML:{__html:e.video.main.code}}),t.jsxs("div",{className:qe.articleSection,children:[t.jsx("p",{className:qe.article,children:be(e.video.main.description)}),t.jsx("p",{className:qe.correspondent,children:n()})]})]})})})},Wn={content:"_content_wxhkd_1",linkStyled:"_linkStyled_wxhkd_9"},Et=e=>{const{currentPage:n,showNext:a,maxPages:s,pathname:o,query:r}=e,i=(l,d,c)=>{let h="";const u=d.split("/");return u.indexOf("page")!==-1&&u.splice(h.indexOf("page")-1,u.length-1),u.forEach((f,y)=>{y!==0&&(h+=`/${f}`)}),l==="next"?h+=`/page/${n+1}${c?`?query=${c}`:""}`:h+=`/page/${n-1}${c?`?query=${c}`:""}`};return(n>1||a&&n<s)&&t.jsxs("section",{className:Wn.content,children:[n>1&&t.jsx(T,{className:Wn.linkStyled,href:i("prev",o||"",r||""),children:e.texts.prevButtonText??"Anterior"}),a&&n<s&&t.jsx(T,{className:Wn.linkStyled,href:i("next",o||"",r||""),children:e.texts.nextButtonText??"Siguiente"})]})},hn={content:"_content_zal5g_1",contentGrid:"_contentGrid_zal5g_8",contentGrid4:"_contentGrid4_zal5g_17",contentGrid3:"_contentGrid3_zal5g_21"},un=e=>{const{grid:n=3}=e;return t.jsxs("section",{className:`${hn.content}`,children:[t.jsx("div",{className:`${hn.contentGrid} ${e.className?e.className:""} ${n===3?hn.contentGrid3:hn.contentGrid4} news-content`,children:e.children}),t.jsx(t.Fragment,{children:e.paginatorComponent})]})},It={content:"_content_15x47_1",newsDescription:"_newsDescription_15x47_15",image:"_image_15x47_41"},Ee=e=>{const{main:n,authors:a,info:s,preview:o,share:r,isVideo:i,config:l,overImage:d="default",isTitle:c,priorityHigh:h=!1,isLarge:u,paths:f}=e;return t.jsxs("section",{className:It.content,style:{...e.customSectionCardStyles},children:[t.jsx(T,{"aria-label":e.main?.title?.section,className:It.image,title:n?.title?.section,href:s?.link?.url,target:s?.link?.target,children:t.jsx(ge,{preview:o,isVideo:i,isLarge:u,priorityHigh:h})}),t.jsx("div",{className:It.newsDescription,children:t.jsx(it,{main:n,authors:a,info:s,preview:o,share:r,config:l,overImage:d,isTitle:c,paths:f})})]})},dt={content:"_content_14xk9_1",boxInformation:"_boxInformation_14xk9_12",titleGradient:"_titleGradient_14xk9_30",sectionDescription:"_sectionDescription_14xk9_58",articule:"_articule_14xk9_83",linkStyled:"_linkStyled_14xk9_116"},Ut=e=>{const{isVideo:n,info:a,main:s,overImage:o="default",titleGradient:r=!1}=e;return t.jsxs("section",{className:dt.content,children:[t.jsx(T,{title:s?.title?.section,href:a.link.url,target:a.link.target,children:t.jsx(ge,{preview:e.preview,isVideo:n})}),t.jsxs("div",{className:[dt.boxInformation,r?dt.titleGradient:""].join(" "),style:{width:o!=="default"?"90%":"",left:o==="left"?0:o==="right"?"calc(10% - 1px)":"auto",top:o!=="default"?"-1rem":""},children:[e?.info?.section&&t.jsx(T,{className:[dt.sectionDescription].join(" "),href:e?.info?.section?.url,children:e?.info?.section?.name}),t.jsx("h2",{className:dt.articule,children:t.jsx(T,{className:dt.linkStyled,href:e?.info?.link?.url,target:e?.info?.link?.target,children:e.main?.title?.section})})]})]})},Fs={content:"_content_kro73_1",contentLayout:"_contentLayout_kro73_5"},Yn=e=>t.jsx("div",{className:Fs.content,children:t.jsx(rt,{className:`${Fs.contentLayout} ${e.className}`,children:e.children})}),ht={content:"_content_1nqra_1",before:"_before_1nqra_11",textContent:"_textContent_1nqra_22",title:"_title_1nqra_37",description:"_description_1nqra_46",linkStyled:"_linkStyled_1nqra_57"},Sl=e=>{const n=e.logo;return t.jsxs("section",{className:ht.content,children:[e.backgroundImgURL&&t.jsx("img",{className:ht.before,src:e.backgroundImgURL,alt:""}),t.jsxs("div",{className:`${ht.textContent} error-text-content`,children:[t.jsx(n,{}),t.jsx("p",{className:ht.title,children:e.title}),t.jsx("p",{className:ht.description,children:e.description}),t.jsx(T,{className:ht.linkStyled,href:"/",children:e.buttonText??"Inicio"})]})]})},Tt={content:"_content_zxcog_1",contentLabel:"_contentLabel_zxcog_8",label:"_label_zxcog_13",required:"_required_zxcog_22",input:"_input_zxcog_28"},kl=e=>t.jsxs("div",{className:Tt.content,children:[t.jsxs("div",{className:Tt.contentLabel,children:[t.jsx("label",{className:Tt.label,children:e.label}),e.required&&t.jsx("span",{className:Tt.required,children:"*"})]}),t.jsx("input",{className:Tt.input,...e})]}),xt={content:"_content_zgx5w_1",contentLabel:"_contentLabel_zgx5w_8",label:"_label_zgx5w_13",required:"_required_zgx5w_22",input:"_input_zgx5w_28"},El=e=>t.jsxs("div",{className:xt.content,children:[t.jsxs("div",{className:xt.contentLabel,children:[t.jsx("label",{className:xt.label,children:e.label}),e.required&&t.jsx("span",{className:xt.required,children:"*"})]}),t.jsxs("select",{className:xt.input,...e,children:[t.jsx("option",{value:"",children:"--Seleccione--"}),e.options.map((n,a)=>t.jsx("option",{value:n.value,children:n.label},a))]})]}),Kn={content:"_content_1mi9t_1",label:"_label_1mi9t_8",input:"_input_1mi9t_17"},Il=e=>t.jsxs("div",{className:Kn.content,children:[t.jsx("label",{className:Kn.label,children:e.label}),t.jsx("textarea",{className:Kn.input,...e})]}),ze={boxInformation:"_boxInformation_achvw_1",textBox:"_textBox_achvw_30",contentBox:"_contentBox_achvw_40",liveBox:"_liveBox_achvw_50",dot:"_dot_achvw_72",sectionDescription:"_sectionDescription_achvw_97",articule:"_articule_achvw_110",description:"_description_achvw_137"},mn={content:"_content_8ehij_1",description:"_description_8ehij_23"},Ws=e=>{let n="";return e.preview.description&&(n=e.preview.description),e.preview.copyright&&(n=`${n} ${e.preview.copyright}`),e.preview.photographer&&(n=`${n} ${e.preview.photographer}`),t.jsxs("div",{className:mn.content,children:[t.jsx(ge,{preview:e.preview,isLarge:!0,priorityHigh:!0}),n&&t.jsx("div",{className:mn.description,children:n})]})},Ys=e=>t.jsx(t.Fragment,{children:t.jsxs("div",{className:ze.boxInformation,children:[t.jsx(Ws,{preview:e.preview}),t.jsxs("div",{className:ze.textBox,children:[t.jsxs("div",{className:ze.contentBox,children:[e?.info?.section&&t.jsx(T,{className:ze.sectionDescription,href:e?.info?.section?.url,children:e?.info?.section?.name}),t.jsxs("div",{className:ze.liveBox,children:[t.jsx("span",{className:ze.dot}),t.jsx("p",{children:"EN VIVO"})]})]}),t.jsx("h1",{className:ze.articule,children:e.main?.title?.section}),e.config?.showsubtitle&&t.jsx("div",{className:ze.description,style:{"--fontSizeSubTitle":e.fontSizeSubTitle,"--lineHeightSubTitle":e.lineHeightSubTitle},children:e.main.subtitle.striped})]})]})}),fn={content:"_content_oipiy_1",contentLine:"_contentLine_oipiy_17",contentText:"_contentText_oipiy_24",dateLink:"_dateLink_oipiy_37"},Ks=e=>t.jsx("section",{className:fn.content,children:e.itemList[0]?.list.items.map((n,a)=>t.jsxs("div",{className:fn.contentLine,children:[t.jsx(T,{className:fn.dateLink,href:`#item-${a+1}`,children:_a(n.date)}),t.jsx("div",{className:fn.contentText,children:(e.itemList[0]?.list.integrated,n.title)})]},a))}),Ae={content:"_content_w8a84_1",contentInfo:"_contentInfo_w8a84_11",imageStyled:"_imageStyled_w8a84_19",contentIconStyled:"_contentIconStyled_w8a84_30",name:"_name_w8a84_56",email:"_email_w8a84_65",description:"_description_w8a84_81",contenSocialNetwork:"_contenSocialNetwork_w8a84_93",socialIcon:"_socialIcon_w8a84_103"},Js=async e=>{const{autor:n,autorIcon:a}=e,s=a;return t.jsx("section",{className:`${Ae.content} ${e.className?e.className:null}`,children:t.jsxs("div",{className:Ae.contentInfo,children:[n.info.image?t.jsx("img",{fetchPriority:"low",loading:"lazy",alt:"",className:Ae.imageStyled,src:await ne(n.info.image.sizes[0]?.url||"")}):t.jsx("div",{className:Ae.contentIconStyled,children:t.jsx(s,{})}),t.jsx("h1",{className:Ae.name,children:n.info.fullname}),n.addtional.USER_SHOWEMAIL&&t.jsx("p",{className:Ae.email,children:n.info.email}),n.addtional.USER_SHOWBIO&&t.jsx("p",{className:Ae.description,children:n.addtional.USER_MIBIO}),t.jsxs("div",{className:Ae.contenSocialNetwork,children:[n.addtional.USER_USERFB&&t.jsx("a",{href:n.addtional.USER_USERFB,target:"_blank",rel:"noreferrer",children:t.jsx(Vn,{className:Ae.socialIcon})}),n.addtional.USER_USERIG&&t.jsx("a",{href:n.addtional.USER_USERIG,target:"_blank",rel:"noreferrer",children:t.jsx(Fn,{className:Ae.socialIcon})}),n.addtional.USER_USERTWT&&t.jsx("a",{href:n.addtional.USER_USERTWT,target:"_blank",rel:"noreferrer",children:t.jsx(kt,{className:Ae.socialIcon})}),n.addtional.USER_USERLIN&&t.jsx("a",{href:n.addtional.USER_USERLIN,target:"_blank",rel:"noreferrer",children:t.jsx(dn,{className:Ae.socialIcon})})]})]})})},me={content:"_content_18ozj_1",contentInfo:"_contentInfo_18ozj_13",contentAuthor:"_contentAuthor_18ozj_26",imageStyled:"_imageStyled_18ozj_33",contentIconStyled:"_contentIconStyled_18ozj_42",name:"_name_18ozj_64",email:"_email_18ozj_72",description:"_description_18ozj_82",contenSocialNetwork:"_contenSocialNetwork_18ozj_93",socialIcon:"_socialIcon_18ozj_103"},Zs=async e=>{const{autor:n,autorIcon:a}=e,s=a;return t.jsx("section",{className:me.content,children:t.jsxs("div",{className:me.contentInfo,children:[n.info.image?t.jsx("img",{fetchPriority:"low",loading:"lazy",className:me.imageStyled,src:await ne(n.info.image.sizes[0]?.url||"")}):t.jsx("div",{className:me.contentIconStyled,children:t.jsx(s,{})}),t.jsxs("div",{className:me.contentAuthor,children:[t.jsx("h1",{className:me.name,children:n.info.fullname}),n.addtional.USER_SHOWEMAIL&&t.jsx("p",{className:me.email,children:n.info.email}),n.addtional.USER_SHOWBIO&&t.jsx("p",{className:me.description,children:n.addtional.USER_MIBIO}),t.jsxs("div",{className:me.contenSocialNetwork,children:[n.addtional.USER_USERFB&&t.jsx("a",{href:n.addtional.USER_USERFB,target:"_blank",rel:"noreferrer",children:t.jsx(Vn,{className:me.socialIcon})}),n.addtional.USER_USERIG&&t.jsx("a",{href:n.addtional.USER_USERIG,target:"_blank",rel:"noreferrer",children:t.jsx(Fn,{className:me.socialIcon,style:{padding:"4px"}})}),n.addtional.USER_USERTWT&&t.jsx("a",{href:n.addtional.USER_USERTWT,target:"_blank",rel:"noreferrer",children:t.jsx(kt,{className:me.socialIcon})}),n.addtional.USER_USERLIN&&t.jsx("a",{href:n.addtional.USER_USERLIN,target:"_blank",rel:"noreferrer",children:t.jsx(dn,{className:me.socialIcon})})]})]})]})})},Xs={content:"_content_jg6i2_1",bannerSection:"_bannerSection_jg6i2_25"},Jn=e=>t.jsxs("section",{className:Xs.content,children:[e.children,t.jsxs("div",{className:Xs.bannerSection,children:[e.bannerTop,t.jsx(rn,{content:e.ranking,title:e.readestTitle,paths:e.paths,customNewsDescriptionStyles:{"--news-description-title-size-desk":"16px","--news-description-title-line-height-desk":"22px","--news-description-title-size-mobile":"16px","--news-description-title-line-height-mobile":"22px"}}),e.banner]})]}),_e={content:"_content_1jqwg_1",header:"_header_1jqwg_21",videos:"_videos_1jqwg_46",videoContent:"_videoContent_1jqwg_53",articleSection:"_articleSection_1jqwg_60",contentLayoutVideoSection:"_contentLayoutVideoSection_1jqwg_74",sectionVideoList:"_sectionVideoList_1jqwg_82",iframeStyled:"_iframeStyled_1jqwg_155",contentFrame:"_contentFrame_1jqwg_164",relatedTitle:"_relatedTitle_1jqwg_189"},Zn={content:"_content_1dj0q_1",linkImage:"_linkImage_1dj0q_12",playStyled:"_playStyled_1dj0q_19"},Ul=async e=>{const n={...e,main:{...e.main,title:{...e.main.title,article:be(e.main.title.article,60)}}};return e&&e.info?t.jsxs("section",{className:Zn.content,children:[t.jsx("a",{className:Zn.linkImage,target:e?.info?.link?.target,title:e?.main?.title?.section,href:e.info.link.url,children:t.jsxs("div",{style:{position:"relative"},children:[t.jsx("img",{src:await ne(e.preview.sizes[0]?.url||"")}),t.jsx(lt,{className:Zn.playStyled})]})}),t.jsx("div",{children:t.jsx(it,{...n,paths:e.paths})})]}):null},Tl=e=>t.jsx("div",{className:_e.content,children:t.jsxs(rt,{className:_e.contentLayoutVideoSection,children:[t.jsxs("a",{className:_e.header,href:"/",children:[t.jsx("svg",{width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.6055 4.86193C12.8659 5.12228 12.8659 5.54439 12.6055 5.80474L8.41026 10L12.6055 14.1953C12.8659 14.4556 12.8659 14.8777 12.6055 15.1381C12.3452 15.3984 11.9231 15.3984 11.6627 15.1381L6.99604 10.4714C6.73569 10.2111 6.73569 9.78894 6.99604 9.52859L11.6627 4.86193C11.9231 4.60158 12.3452 4.60158 12.6055 4.86193Z",fill:"white"})}),"VOLVER A VIDEOS"]}),t.jsxs("div",{className:_e.videos,children:[t.jsxs("div",{className:_e.videoContent,style:e.mainVideoStyles,children:[e.type==="vy"&&t.jsx("iframe",{className:_e.iframeStyled,src:`https://www.youtube.com/embed/${e.video?.main?.code}`,frameBorder:"0",allowFullScreen:!0}),e.type==="vf"&&t.jsx("iframe",{className:_e.iframeStyled,src:e.video?.main?.code,frameBorder:"0",allowFullScreen:!0}),e.type==="ve"&&t.jsx("div",{className:_e.contentFrame,dangerouslySetInnerHTML:{__html:e.video?.main?.code}}),t.jsx("div",{className:_e.articleSection,children:t.jsx(it,{...nt(e.video,!0,!!e.video.main.description),paths:e.paths})})]}),t.jsxs("div",{className:_e.sectionVideoList,style:e.listVideoStyles,children:[e.banner&&t.jsx(ae,{banners:e.banner.banners,name:e.banner.bannerName}),e.relatedName&&t.jsx("h2",{className:_e.relatedTitle,children:e.relatedName}),Array.isArray(e.videoList)&&e.videoList.map((n,a)=>b.createElement(Ul,{...nt(n,!0,!1),key:a,paths:e.paths}))]})]})]})}),Be={content:"_content_gcte1_1",titleContent:"_titleContent_gcte1_24",title:"_title_gcte1_24",startLine:"_startLine_gcte1_88",line:"_line_gcte1_93",bottomLine:"_bottomLine_gcte1_99",childrenContent:"_childrenContent_gcte1_118",readMore:"_readMore_gcte1_131"},te=b.forwardRef((e,n)=>{const{isTitle:a=!1,isOpinion:s=!1}=e,o=a?t.jsx("h1",{className:Be.title,children:e.title}):t.jsx("h2",{className:Be.title,children:e.title});return t.jsxs("section",{className:Be.content,children:[e.title&&t.jsxs("div",{className:[Be.titleContent,e.className??""].join(" "),"data-after":`${s}`,children:[t.jsx("hr",{className:Be.startLine}),e.titleUrl?t.jsx(T,{href:e.titleUrl,children:o}):o,t.jsx("hr",{className:Be.line}),e.titleUrl&&t.jsx(T,{className:Be.readMore,href:e.titleUrl?.toString()??""})]}),e.title&&t.jsx("hr",{className:[Be.bottomLine,e.className??""].join(" ")}),t.jsx("div",{className:Be.childrenContent,ref:n,children:e.children})]})}),Xn=e=>t.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"var(--header-icons)",xmlns:"http://www.w3.org/2000/svg",...e,children:t.jsx("path",{d:"M10.5283 0.562859C13.1487 0.49118 15.6972 1.42576 17.6494 3.17516C19.6016 4.92465 20.8095 7.3565 21.0244 9.96911C21.2392 12.5816 20.4447 15.1772 18.8047 17.222L18.6641 17.3978L18.8232 17.556L23.1475 21.8451H23.1484C23.3137 22.016 23.4062 22.2451 23.4062 22.4828C23.4062 22.7194 23.3143 22.9469 23.1504 23.1175C23.0653 23.2033 22.964 23.2712 22.8525 23.3177C22.7409 23.3642 22.6209 23.388 22.5 23.3881C22.3791 23.3881 22.2591 23.3642 22.1475 23.3177C22.0358 23.2712 21.9338 23.2034 21.8486 23.1175L17.5547 18.8236L17.3965 18.6644L17.2217 18.805C15.1768 20.4451 12.5812 21.2395 9.96875 21.0248C7.35614 20.8099 4.9243 19.602 3.1748 17.6498C1.4254 15.6976 0.490821 13.149 0.5625 10.5287C0.634205 7.90823 1.70691 5.41454 3.56055 3.56091C5.41418 1.70727 7.90787 0.634563 10.5283 0.562859ZM14.0537 3.057C12.516 2.42011 10.8239 2.25385 9.19141 2.57848C7.55873 2.90324 6.05893 3.7051 4.88184 4.88219C3.70474 6.05929 2.90288 7.55909 2.57812 9.19176C2.25349 10.8242 2.41975 12.5163 3.05664 14.0541C3.69368 15.592 4.77311 16.9066 6.15723 17.8314C7.54131 18.7562 9.16841 19.2504 10.833 19.2504C13.0652 19.2504 15.2058 18.363 16.7842 16.7845C18.3626 15.2061 19.25 13.0656 19.25 10.8334C19.25 9.16877 18.7558 7.54167 17.8311 6.15759C16.9062 4.77347 15.5917 3.69404 14.0537 3.057Z",fill:"var(--header-icons)",stroke:"var(--header-icons)",strokeWidth:"0.5"})}),gn=e=>t.jsx("svg",{width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.862254 3.39448C1.1226 3.13413 1.54471 3.13413 1.80506 3.39448L6.00033 7.58974L10.1956 3.39448C10.4559 3.13413 10.878 3.13413 11.1384 3.39448C11.3987 3.65483 11.3987 4.07694 11.1384 4.33729L6.47173 9.00396C6.21138 9.26431 5.78927 9.26431 5.52892 9.00396L0.862254 4.33729C0.601905 4.07694 0.601905 3.65483 0.862254 3.39448Z",fill:e.fill??"#7B888A"})}),J={drawerStyled:"_drawerStyled_1dhzk_1",sidebarCustom:"_sidebarCustom_1dhzk_6",accordionStyled:"_accordionStyled_1dhzk_24",accordionHeading:"_accordionHeading_1dhzk_35",accordionSummeryStyled:"_accordionSummeryStyled_1dhzk_44",linkStyled:"_linkStyled_1dhzk_71",subLinkStyled:"_subLinkStyled_1dhzk_91",inputContent:"_inputContent_1dhzk_113",buttonContent:"_buttonContent_1dhzk_114",inputStyled:"_inputStyled_1dhzk_124",buscar:"_buscar_1dhzk_140",buttonStyled:"_buttonStyled_1dhzk_149",accordionDetailsStyled:"_accordionDetailsStyled_1dhzk_164",footerSlider:"_footerSlider_1dhzk_179",socialMedia:"_socialMedia_1dhzk_190",copyRights:"_copyRights_1dhzk_209",icon:"_icon_1dhzk_220"},xl=({sidebar:e,socials:n,copyrigth:a,sidebarExtra:s,searchKeyWord:o})=>t.jsxs("aside",{className:J.drawerStyled,id:"sidebar-expandable",style:{"--header-icons":"var(--search-input-icons)"},children:[t.jsx("input",{type:"checkbox",id:"side-bar-state"}),t.jsxs("section",{className:J.sidebarCustom,children:[t.jsx("div",{className:J.buttonContent,children:t.jsx("label",{className:J.buttonStyled,htmlFor:"side-bar-state",children:t.jsx(ct,{className:J.icon})})}),t.jsx("div",{className:J.inputContent,children:t.jsxs(T,{href:"/buscar",className:J.inputStyled,children:[t.jsxs("p",{className:J.buscar,children:[o,"..."]}),t.jsx(Xn,{color:"var(--search-input-icons)"})]})}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:"space-between",height:"100%"},children:[t.jsxs("div",{children:[s,e.map((r,i)=>t.jsxs("div",{className:J.accordionStyled,children:[t.jsx("input",{type:"checkbox",style:{display:"none"},id:"accordion_"+i}),t.jsx("h3",{className:J.accordionHeading,children:Array.isArray(r.subitem)?t.jsxs("label",{className:J.accordionSummeryStyled,htmlFor:"accordion_"+i,children:[r.link?t.jsx(T,{className:`${J.linkStyledAccordion} ${J.linkStyled}`,href:r.link?r.link:void 0,target:r.target,children:r.description}):t.jsx("div",{children:r.description}),t.jsx(gn,{width:13,height:13,fill:"var(--side-bar-arrow-color)"})]}):t.jsx(T,{className:J.linkStyled,href:r.link?r.link:void 0,target:r.target,children:r.description})}),Array.isArray(r.subitem)&&t.jsx("div",{className:J.accordionDetailsStyled,style:{"--max-height":r.subitem.length*45+"px"},children:r.subitem.map((l,d)=>t.jsx(T,{className:J.subLinkStyled,href:l.link?l.link:void 0,target:l.target,children:l.description},d))})]},i))]}),t.jsxs("div",{className:J.footerSlider,children:[t.jsx("div",{className:J.socialMedia,children:Object.keys(n).map(r=>n[r]?.show&&t.jsx("a",{target:"_blank",rel:"noreferrer","aria-label":n[r].title+" link",className:J.linkSocialNetwork,href:n[r].url,children:cn[r]({className:J.icon})},r))}),t.jsx("p",{className:J.copyRights,children:a})]})]})]})]}),Rs=e=>t.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[t.jsx("path",{d:"M5 22.5H25C25.6875 22.5 26.25 21.9375 26.25 21.25C26.25 20.5625 25.6875 20 25 20H5C4.3125 20 3.75 20.5625 3.75 21.25C3.75 21.9375 4.3125 22.5 5 22.5ZM5 16.25H25C25.6875 16.25 26.25 15.6875 26.25 15C26.25 14.3125 25.6875 13.75 25 13.75H5C4.3125 13.75 3.75 14.3125 3.75 15C3.75 15.6875 4.3125 16.25 5 16.25ZM3.75 8.75C3.75 9.4375 4.3125 10 5 10H25C25.6875 10 26.25 9.4375 26.25 8.75C26.25 8.0625 25.6875 7.5 25 7.5H5C4.3125 7.5 3.75 8.0625 3.75 8.75Z",fill:e.color}),t.jsx("path",{d:"M5 22.5H25C25.6875 22.5 26.25 21.9375 26.25 21.25C26.25 20.5625 25.6875 20 25 20H5C4.3125 20 3.75 20.5625 3.75 21.25C3.75 21.9375 4.3125 22.5 5 22.5ZM5 16.25H25C25.6875 16.25 26.25 15.6875 26.25 15C26.25 14.3125 25.6875 13.75 25 13.75H5C4.3125 13.75 3.75 14.3125 3.75 15C3.75 15.6875 4.3125 16.25 5 16.25ZM3.75 8.75C3.75 9.4375 4.3125 10 5 10H25C25.6875 10 26.25 9.4375 26.25 8.75C26.25 8.0625 25.6875 7.5 25 7.5H5C4.3125 7.5 3.75 8.0625 3.75 8.75Z",fill:e.color})]}),qt={content:"_content_1k52x_1",chipStyled:"_chipStyled_1k52x_17",headLine:"_headLine_1k52x_17",live:"_live_1k52x_25",closeLiveStyled:"_closeLiveStyled_1k52x_88"},eo=e=>{const{alertZone:n,id:a="close-alert"}=e,s=()=>t.jsx(T,{className:qt.headLine,href:n?.data[0]?.info.link.url,target:n?.data[0]?.info.link.target,title:n?.data[0]?.main.title.home,children:n?.data[0]?.main?.title.home??""});return t.jsxs(t.Fragment,{children:[t.jsx("input",{type:"checkbox",id:a,style:{display:"none"},defaultChecked:!(n&&n?.data&&n?.data[0]?.main?.title.home)}),n&&n?.data&&n?.data[0]?.main?.title.home&&t.jsxs("div",{id:"alert-chip",className:qt.content,style:e.forceShow?{display:"flex",position:"sticky",top:100}:{},children:[t.jsxs("div",{className:qt.live,children:[t.jsx("div",{className:qt.chipStyled,children:n?.entity?.description}),e.forceShow&&t.jsx(s,{}),t.jsx("label",{htmlFor:a,children:t.jsx(ct,{className:qt.closeLiveStyled})})]}),t.jsx(s,{})]})]})},Le={content:"_content_18yq5_1",linkStyled:"_linkStyled_18yq5_14",linkSocialNetwork:"_linkSocialNetwork_18yq5_28",title:"_title_18yq5_49",tabs:"_tabs_18yq5_60",socialNetwork:"_socialNetwork_18yq5_68",icon:"_icon_18yq5_78",facebook:"_facebook_18yq5_84",youtube:"_youtube_18yq5_88",x:"_x_18yq5_92",instagram:"_instagram_18yq5_96",gnews:"_gnews_18yq5_100",tiktok:"_tiktok_18yq5_104",whatsapp:"_whatsapp_18yq5_108"},ql=e=>{const{cintillo:n,tapeTitle:a,socials:s}=e,o="",r=n?.findIndex(i=>i.link===o)??0;return(Array.isArray(n)||e.socialIcons)&&t.jsxs("section",{className:Le.content,children:[Array.isArray(n)&&t.jsxs("div",{className:`${Le.tabs} header-page-tape-content`,children:[a!==""&&t.jsx("p",{className:Le.title,children:`${a}`}),n&&n[r]&&t.jsx(T,{className:Le.linkStyled,target:n[r]?.target,href:n[r]?.link,style:{color:n[r]?.link===o?"var(--header-tape-active-link)":"var(--header-tape-icons)",fontWeight:n[r]?.link===o?"700":"400"},children:n[r]?.description},r),n&&n.map((i,l)=>{if(l!==r)return t.jsx(T,{className:Le.linkStyled,href:i?.link,style:{color:i?.link===o?"var(--header-tape-active-link)":"var(--header-tape-color)",fontWeight:i?.link===o?"700":"400"},children:i?.description},l)})]}),t.jsx("div",{className:Le.socialNetwork,children:Object.keys(s).map(i=>s[i]?.show&&t.jsx("a",{target:"_blank",rel:"noreferrer","aria-label":s[i].title+" link",className:Le.linkSocialNetwork,href:s[i].url,children:cn[i]({className:[Le.icon,Le[i]??""].join(" ")})},i))})]})},we={headerStyled:"_headerStyled_t61zq_1",headerContent:"_headerContent_t61zq_14",iconContent:"_iconContent_t61zq_25",menuButton:"_menuButton_t61zq_34",logoStyled:"_logoStyled_t61zq_66",buttonSection:"_buttonSection_t61zq_94",buttonSectionSearch:"_buttonSectionSearch_t61zq_109",headLineContent:"_headLineContent_t61zq_130",headLineTitle:"_headLineTitle_t61zq_143",headLine:"_headLine_t61zq_130",hasAlertZone:"_hasAlertZone_t61zq_196"},Bl=e=>{const{alertZone:n}=e;return t.jsxs("header",{className:we.headerStyled,children:[e.socialIcons&&t.jsx(ql,{socialIcons:e.socialIcons,cintillo:e.cintillo,tapeTitle:e.tapeTitle,socials:e.socials}),t.jsxs("div",{className:`${we.headerContent} center-mobile-header-icon`,children:[t.jsx(ln,{id:"button-app",className:we.menuButton,toggledrawerevent:"true","aria-label":"menu","aria-labelledby":"menu",title:"menu",children:t.jsx(Rs,{className:we.startIcon,color:"var(--header-icons)",width:27,height:27})}),t.jsx("div",{className:we.iconContent,children:t.jsx(T,{href:"/","aria-label":"Home",className:"icon header-logo-link-sticky",style:{display:"flex"},children:b.createElement("span",{className:we.logoStyled},e.icon)})}),!e.showAlertPop&&n?.data&&t.jsxs("div",{className:we.headLineContent,children:[t.jsx("div",{className:`${we.headLineTitle} headLineTitle`,children:n.entity.description?`${n.entity.description}`:""}),t.jsx(T,{className:we.headLine,href:n.data[0]?.info.link.url,target:n.data[0]?.info.link.target,title:n.data[0]?.main.title.home,children:be(n.data[0]?.main.title.home??"",120)})]}),t.jsxs("div",{style:e.showAlertPop?{marginLeft:"auto"}:{},className:[we.buttonSection,n?.data?we.hasAlertZone:"","search-button"].join(" "),children:[t.jsx(T,{href:e.searchLink?e.searchLink:"/buscar","aria-label":e.searchKeyWord,className:`${we.buttonSectionSearch} search-button-icon`,style:{display:"flex"},children:t.jsx(Xn,{width:28,height:28,color:"currentColor"})}),e.rightZone]})]}),!e.showAlertPop&&t.jsx(eo,{alertZone:n,forceShow:e.showAlertPop})]})},De={ul:"_ul_j3aqc_1",li:"_li_j3aqc_10",liBefore:"_liBefore_j3aqc_18",ulContent:"_ulContent_j3aqc_33",contentModal:"_contentModal_j3aqc_44",linkStyled:"_linkStyled_j3aqc_56",itemLink:"_itemLink_j3aqc_81"},Ll=e=>{const{items:n}=e;return t.jsx("ul",{className:De.ul,children:n.map((a,s)=>t.jsxs("li",{className:`${De.liBefore} ${De.li}`,children:[a.link?t.jsxs(T,{"aria-label":a.description,className:De.linkStyled,href:a.link?a.link:void 0,target:a.target,children:[a.description,Array.isArray(a.subitem)&&t.jsx(gn,{})]}):t.jsxs("span",{"aria-label":a.description,className:De.linkStyled,children:[a.description,Array.isArray(a.subitem)&&t.jsx(gn,{})]}),Array.isArray(a.subitem)&&t.jsx("ul",{className:De.ulContent,children:t.jsx("div",{className:De.contentModal,children:a.subitem.map((o,r)=>t.jsx("li",{className:De.li,children:t.jsx(T,{className:De.itemLink,"aria-label":o.description,href:o.link?o.link:void 0,target:o.target,children:o.description})},r))})})]},s))})},re={headerStyled:"_headerStyled_ksxbt_1",headerContent:"_headerContent_ksxbt_23",menuButtonSection:"_menuButtonSection_ksxbt_33",menuButton:"_menuButton_ksxbt_33",buttonSection:"_buttonSection_ksxbt_84",buttonSectionSearch:"_buttonSectionSearch_ksxbt_101",hasAlertZone:"_hasAlertZone_ksxbt_111",buttonText:"_buttonText_ksxbt_130",logoContent:"_logoContent_ksxbt_140",logoStyled:"_logoStyled_ksxbt_148",headLineContent:"_headLineContent_ksxbt_172",headLineTitle:"_headLineTitle_ksxbt_187",menuSection:"_menuSection_ksxbt_203",headLine:"_headLine_ksxbt_172",line:"_line_ksxbt_255"},Dl=e=>{const{menu:n,alertZone:a}=e;return t.jsx("header",{className:re.headerStyled,style:{top:e.cintillo||e.socialIcons?40:0},children:t.jsxs("div",{style:e.showAlertPop?{gap:0}:{},className:[re.headerContent,a?.data?re.hasAlertZone:""].join(" "),children:[t.jsx("div",{className:re.menuButtonSection,children:t.jsxs(ln,{className:re.menuButton,id:"button-app",toggledrawerevent:"true","aria-label":"menu","aria-labelledby":"menu",title:"menu",children:[t.jsx(Rs,{color:"var(--header-icons)",width:27,height:27}),t.jsx("p",{className:re.buttonText,style:{lineHeight:0},children:e.menuText})]})}),t.jsx("div",{className:re.logoContent,children:t.jsx(T,{href:"/","aria-label":"Home",className:"header-logo-link",children:b.createElement("span",{className:`${re.logoStyled}`},e.icon)})}),t.jsxs("div",{className:re.buttonSection,children:[t.jsx(T,{href:e.searchLink?e.searchLink:"/buscar",style:{display:"flex"},className:re.buttonSectionSearch,"aria-label":e.searchKeyWord,children:t.jsx(Xn,{width:28,height:28,color:"currentColor"})}),e.rightZone]}),!e.showAlertPop&&a?.data?t.jsxs("div",{className:re.headLineContent,children:[t.jsx("p",{className:`${re.headLineTitle} headLineTitle`,children:a.entity.description?`${a.entity.description}`:""}),t.jsx(T,{className:re.headLine,href:a.data[0]?.info.link.url,target:a.data[0]?.info.link.target,title:a.data[0]?.main.title.home,children:be(a.data[0]?.main.title.home??"",120)})]}):t.jsx("div",{className:re.line}),t.jsx("div",{className:re.menuSection,style:e.showAlertPop?{"--showAlertPop":"0px"}:{},children:Array.isArray(n)&&t.jsx(Ll,{items:n})})]})})},Rn={childrenContent:"_childrenContent_wqlb4_1",childrenContentAux:"_childrenContentAux_wqlb4_12",op2:"_op2_wqlb4_25"},Ml=e=>{const{alertZone:n,children:a,sidebar:s}=e;return t.jsxs(t.Fragment,{children:[t.jsx(Bl,{...e}),!e.showOnlyStickyHeader&&t.jsx(Dl,{...e}),t.jsxs("div",{className:[Rn.childrenContent,e.showAlertPop?Rn.op2:"",n?.data?Rn.childrenContentAux:""].join(" "),style:e.showOnlyStickyHeader?{"--hasAlertMargin":"3.6rem !important"}:{},id:"content-layout",children:[e.showAlertPop&&t.jsx(eo,{alertZone:n,forceShow:e.showAlertPop,id:"static-alert-chip"}),a]}),t.jsx(xl,{sidebarExtra:e.sidebarExtra,searchKeyWord:e.searchKeyWord,sidebar:s,socials:e.socials,copyrigth:e.copyrigth})]})},ut={content:"_content_16ydf_1",tags:"_tags_16ydf_10",chipStyled:"_chipStyled_16ydf_20",tagLink:"_tagLink_16ydf_47",tagStyled:"_tagStyled_16ydf_53"},to=e=>t.jsx("section",{className:ut.content,children:Array.isArray(e.tags)&&t.jsxs("div",{className:ut.tags,children:[t.jsx("p",{className:ut.tagStyled,children:e.title?e.title:"Tags:"}),e.tags.map((n,a)=>n.approved?t.jsx(T,{href:qn(n,e.paths),children:t.jsx("div",{className:`${ut.chipStyled} ${ut.tagLink}`,children:n.name})},a):t.jsx("div",{className:ut.chipStyled,children:n.name},a))]})}),Ie={contentBox:"_contentBox_1rkkg_1",content:"_content_1rkkg_1",imageStyled:"_imageStyled_1rkkg_16",contentIconStyled:"_contentIconStyled_1rkkg_23",avatarContent:"_avatarContent_1rkkg_43",journalistSection:"_journalistSection_1rkkg_50",journalistInfo:"_journalistInfo_1rkkg_56",socialNetworkSection:"_socialNetworkSection_1rkkg_70",article:"_article_1rkkg_83"},no=async e=>{const{autor:n}=e;return n.addtional.USER_SHOWBIO&&t.jsx("section",{className:Ie.contentBox,children:t.jsxs("div",{className:Ie.content,children:[t.jsxs("div",{className:Ie.avatarContent,children:[t.jsx(T,{className:Ie.journalistInfo,href:`/${e.paths.autor}/${n.info.name}`,children:n.info.image?t.jsx("img",{fetchPriority:"low",loading:"lazy",alt:"autor-image",className:Ie.imageStyled,src:await ne(n.info.image.sizes[0]?.url||"")}):t.jsx("div",{className:Ie.contentIconStyled,children:e.autorIcon()})}),t.jsxs("section",{className:Ie.journalistSection,children:[t.jsx("h3",{className:Ie.journalistInfo,children:t.jsx(T,{href:`/${e.paths.autor}/${n.info.name}`,children:n.info.fullname})}),t.jsxs("section",{className:Ie.socialNetworkSection,children:[n.addtional.USER_USERFB&&t.jsx("a",{href:n.addtional.USER_USERFB,target:"_blank","aria-label":n.addtional.USER_MIBIO,rel:"noreferrer",children:t.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M16.7266 4H14.545C12.1067 4 10.5025 5.52672 10.5025 7.96947V9.80153H8.32083C8.12833 9.80153 8 9.92366 8 10.1069V12.7328C8 12.916 8.12833 13.0382 8.32083 13.0382H10.5025V19.6947C10.5025 19.8779 10.6308 20 10.8233 20H13.7108C13.9033 20 14.0316 19.8779 14.0316 19.6947V13.0382H16.5983C16.7908 13.0382 16.9191 12.916 16.9191 12.7328V10.1069C16.9191 10.0458 16.855 9.92366 16.7908 9.8626C16.7266 9.80153 16.6625 9.74046 16.5341 9.74046H13.9675V8.21374C13.9675 7.48092 14.16 7.1145 15.1866 7.1145H16.6625C16.855 7.1145 16.9833 6.99237 16.9833 6.80916V4.36641C17.0475 4.12214 16.9191 4 16.7266 4Z",stroke:"black",strokeWidth:"1.4"})})}),n.addtional.USER_USERIG&&t.jsx("a",{href:n.addtional.USER_USERIG,target:"_blank","aria-label":n.addtional.USER_MIBIO,rel:"noreferrer",children:t.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsxs("g",{clipPath:"url(#clip0_281_2357)",children:[t.jsx("path",{d:"M7.98634 4.06233C10.9335 4.1651 14.0152 3.89192 16.947 4.05106C19.1239 4.16908 20.8447 5.87246 20.9992 8.04131V17.0111C20.8646 19.1408 19.1378 20.8608 17.0113 21H8.04335C5.91354 20.8654 4.19406 19.1388 4.05551 17.0111C4.18345 14.0751 3.88383 10.9919 4.05353 8.07313C4.17682 5.95269 5.86648 4.21616 7.98634 4.06233ZM7.9532 5.4859C6.65331 5.64503 5.63713 6.68072 5.48201 7.97964L5.47804 17.0442C5.62586 18.3902 6.69175 19.4518 8.04136 19.5784L17.0445 19.5764C18.3901 19.4319 19.4514 18.3611 19.578 17.0131L19.576 8.00882C19.4321 6.67277 18.3788 5.6205 17.0445 5.47662L7.9532 5.4859Z",fill:"black"}),t.jsx("path",{d:"M15.527 9.52595C17.7019 11.7008 16.868 15.4802 13.9752 16.5079C10.6708 17.6815 7.47508 14.6354 8.47999 11.2771C9.38614 8.24892 13.2851 7.28484 15.5263 9.52662L15.527 9.52595ZM12.1894 9.72288C9.96615 9.94898 8.93936 12.6602 10.3771 14.3629C11.8149 16.0656 14.5877 15.4769 15.2168 13.3796C15.8458 11.2824 14.2529 9.51269 12.1894 9.72288Z",fill:"black"}),t.jsx("path",{d:"M17.0868 6.87507C18.5955 6.84324 18.4874 9.24614 16.8939 8.96965C15.7213 8.76609 15.8227 6.90159 17.0868 6.87507Z",fill:"black"})]}),t.jsx("defs",{children:t.jsx("clipPath",{id:"clip0_281_2357",children:t.jsx("rect",{width:"17",height:"17",fill:"white",transform:"translate(4 4)"})})})]})}),n.addtional.USER_USERTWT&&t.jsx("a",{href:n.addtional.USER_USERTWT,target:"_blank","aria-label":n.addtional.USER_MIBIO,rel:"noreferrer",children:t.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M3.43242 4.23888L10.0354 13.0628L3.39062 20.2389H4.88316L10.6981 13.9583L15.3966 20.2389H20.4832L13.51 10.9135L19.6951 4.23291H18.2026L12.8473 10.018L8.51898 4.23291H3.43242V4.23888ZM5.62943 5.33739H7.96973L18.2921 19.1404H15.9518L5.62943 5.33739Z",fill:"#010101"})})}),n.addtional.USER_USERLIN&&t.jsx("a",{href:n.addtional.USER_USERLIN,target:"_blank","aria-label":n.addtional.USER_MIBIO,rel:"noreferrer",children:t.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M13.1553 9.97173C13.2123 9.98635 13.2208 9.9478 13.2536 9.92189C13.9389 9.38958 14.1885 9.05464 15.1143 8.85195C17.735 8.27844 20.2954 9.68265 20.4618 12.5449C20.6046 15.0084 20.3504 17.6121 20.4618 20.0903C20.4316 20.4372 20.1892 20.6425 19.8557 20.6718C18.9876 20.7475 18.0154 20.6133 17.1361 20.6704C16.8583 20.6465 16.5825 20.4578 16.5609 20.1574C16.4875 18.1631 16.6637 16.0916 16.5642 14.1066C16.5334 13.4979 16.462 12.9835 15.9182 12.6353C14.805 11.9215 13.5333 12.6346 13.4495 13.9405C13.3197 15.9488 13.5484 18.1006 13.4521 20.1235C13.4383 20.4491 13.1795 20.6392 12.8768 20.6698C11.917 20.7675 10.8058 20.5967 9.82899 20.6718C9.59116 20.6478 9.35988 20.5422 9.2793 20.2989V9.41284C9.35006 9.20815 9.53219 9.08654 9.7353 9.04467C10.6604 9.10581 11.7061 8.95363 12.6161 9.04068C12.8126 9.05929 13.1553 9.2786 13.1553 9.49059V9.97239V9.97173ZM9.84668 20.1062H12.8768L12.926 20.0564V13.6766C12.926 12.7821 13.9657 11.877 14.8103 11.7999C16.2163 11.6717 17.0464 12.6253 17.1191 13.9763C17.2252 15.9468 17.0418 18.0115 17.1178 19.9919L17.1689 20.1062H19.8551L19.9062 19.9919L19.9042 12.5808C19.6992 9.46068 16.1671 8.36948 13.8924 10.104L12.6318 11.4005V9.60622H9.84733V20.1062H9.84668Z",fill:"black",stroke:"black",strokeWidth:"0.5"}),t.jsx("path",{d:"M4.6294 9.04917C5.38612 8.92822 6.41671 9.11629 7.2016 9.04917C7.53181 9.13755 7.79847 9.39274 7.8666 9.73698L7.88102 19.9233C7.84564 20.243 7.56326 20.5387 7.26581 20.6284C6.93888 20.7261 5.19219 20.7095 4.78926 20.667C4.38633 20.6244 4.10854 20.3958 3.99061 20.015L3.9834 9.75626C3.99781 9.43062 4.31885 9.09967 4.6294 9.04917ZM4.72702 9.61338C4.60319 9.64926 4.53243 9.75692 4.53833 9.88717L4.54685 19.8834C4.59729 20.0502 4.72767 20.0901 4.88426 20.1061C5.31012 20.1493 6.64078 20.1659 7.03781 20.0988C7.18064 20.0748 7.32085 19.9884 7.32478 19.825L7.31626 9.86392C7.29464 9.73831 7.20554 9.62933 7.07647 9.60872L4.72702 9.61404V9.61338Z",fill:"black",stroke:"black",strokeWidth:"0.5"}),t.jsx("path",{d:"M8.16428 6.20159C8.16428 7.45495 7.16252 8.47105 5.92687 8.47105C4.69121 8.47105 3.68945 7.45495 3.68945 6.20159C3.68945 4.94824 4.69121 3.93213 5.92687 3.93213C7.16252 3.93213 8.16428 4.94824 8.16428 6.20159ZM7.60345 6.20358C7.60345 5.2639 6.85263 4.50165 5.92556 4.50165C4.99849 4.50165 4.24766 5.26324 4.24766 6.20358C4.24766 7.14393 4.99849 7.90552 5.92556 7.90552C6.85263 7.90552 7.60345 7.14393 7.60345 6.20358Z",fill:"black",stroke:"black",strokeWidth:"0.5"})]})})]})]})]}),n.addtional.USER_SHOWBIO&&t.jsx("p",{className:Ie.article,dangerouslySetInnerHTML:{__html:`${n.addtional.USER_MIBIO} <a aria-label="${n.info.name}" href="/${e.paths.autor}/${n.info.name}">${e.texts.authorViewMore??"Ver más"}</a>`}})]})})},He={content:"_content_vmnac_1",imageStyled:"_imageStyled_vmnac_20",contentIconStyled:"_contentIconStyled_vmnac_21",contentCard:"_contentCard_vmnac_31",contentInfo:"_contentInfo_vmnac_70",fullName:"_fullName_vmnac_76",LearnMoreLink:"_LearnMoreLink_vmnac_83"},ao=async e=>{const{news:n,texts:a}=e;return n.config?.showauthor&&t.jsx("div",{className:He.content,children:Array.isArray(n.authors)&&n.authors?.map(async s=>t.jsxs("div",{className:He.contentCard,children:[s.image?t.jsx("img",{fetchPriority:"low",loading:"lazy",className:He.imageStyled,src:await ne(s.image.sizes[0]?.url||"")},s.fullname):t.jsx("div",{className:He.contentIconStyled,children:e.autorIcon},s.fullname),t.jsxs("div",{className:He.contentInfo,children:[s.internaluser?t.jsx("a",{className:He.fullName,href:`/${e.paths.autor}/${s.name}`,children:s.fullname}):t.jsx("p",{className:He.fullName,children:s.fullname}),s.internaluser&&t.jsx("a",{className:He.LearnMoreLink,href:`/${e.paths.autor}/${s.name}`,children:a.JournalistGroupLink})]})]},`author-${s.firstname}`))})},Me={content:"_content_1j0pj_1",contentNews:"_contentNews_1j0pj_10",linkTitle:"_linkTitle_1j0pj_27",tag:"_tag_1j0pj_35",tagmx:"_tagmx_1j0pj_55",titular:"_titular_1j0pj_70",correspondent:"_correspondent_1j0pj_85",correspondentLink:"_correspondentLink_1j0pj_96",description:"_description_1j0pj_107"},mt=e=>{const n=()=>{if(e?.config?.showtime&&e.config?.showauthor)return`${e?.authors[0]?.fullname} - ${ye(e.info?.date?.modified)}`;if(e.config?.showauthor)return e?.authors[0]?.fullname;if(e?.config?.showtime)return ye(e.info?.date?.modified)};return t.jsxs("section",{className:`${Me.content} destacado-super-content`,children:[t.jsx(T,{href:e?.info?.link?.url,target:e?.info?.link?.target,style:{"--heightImageOverwrite":e.heightImageOverwrite?e.heightImageOverwrite:"51.8%","--heightImageOverwriteMobile":e.heightImageOverwriteMobile?e.heightImageOverwriteMobile:"491px","--fontSizeImageNewsTitleMobile":e.isVertical?"20px":"1.75rem","--lineHeightImageNewsTitleMobile":e.isVertical?"26px":"36px"},children:t.jsx(ge,{preview:e.preview,isLarge:!0,BackDropAuxHeigthMobile:"513px",priorityHigh:!0})}),t.jsxs("div",{className:Me.contentNews,style:{"--widthTextContent":e.textPosition==="start"?"100%":"80%"},children:[t.jsx(T,{className:Me.tagmx,href:e?.info?.section?.url,children:e?.info?.section?.name}),t.jsxs("div",{style:{position:"relative"},children:[t.jsx(T,{className:Me.tag,href:e?.info?.section?.url,children:e?.info?.section?.name}),t.jsx(T,{className:Me.linkTitle,href:e?.info?.link?.url,target:e?.info?.link?.target,children:t.jsx("h1",{className:Me.titular,style:{"--titlePosition":e.textPosition==="start"?"initial":"center"},children:e?.main?.title?.home})})]}),e.config?.showsubtitle&&t.jsx("div",{className:Me.description,dangerouslySetInnerHTML:{__html:e.main.subtitle.striped}}),e?.config?.showtime&&e.config?.showauthor&&t.jsx(t.Fragment,{children:e.authors[0]?.internaluser?t.jsx(T,{href:`/${e.paths?.autor??"autor"}/${e?.authors[0]?.name}`,className:Me.correspondent,children:n()}):t.jsx("p",{className:Me.correspondentLink,children:n()})})]})]})},so=e=>{const{main:n,authors:a,info:s,preview:o,isVideo:r,config:i,itemReverseOrder:l,imageSize:d,showSuper:c}=e;return t.jsxs("section",{className:Wi.content,children:[c?t.jsx("section",{style:{...e.customSectionCardStyles},children:t.jsx(mt,{main:n,authors:a,info:s,preview:o,isVideo:r,config:i,paths:e.paths})}):t.jsx(Ee,{...e,main:n,authors:a,info:s,preview:o,isVideo:r,config:i,priorityHigh:!0}),e.banners&&t.jsx(ae,{banners:e.banners,name:"main_block_"+(e.rightOnlyBanner?1:2)}),!e.rightOnlyBanner&&t.jsx(Qs,{block:e.block,itemReverseOrder:l,priorityHigh:!0,imageSize:d,customNewsDescriptionStyles:e.customNewsDescriptionStyles,paths:e.paths})]})},ea={content:"_content_1dcf7_1",firstSection:"_firstSection_1dcf7_10",secondSection:"_secondSection_1dcf7_16"},Pl=({content:e,customLargeSection:n,customSmallSection:a,paths:s})=>{const o=e[0];return Array.isArray(e)&&e.length>0&&o&&t.jsxs("section",{className:ea.content,children:[t.jsx("div",{style:n,className:ea.firstSection,children:t.jsx(mt,{...o,textPosition:"start",heightImageOverwrite:"512px",heightImageOverwriteMobile:"270px",paths:s})}),t.jsx("div",{style:a,className:ea.secondSection,children:e.map((r,i)=>i>0&&b.createElement(mt,{...r,key:i,textPosition:"start",heightImageOverwrite:"256px",heightImageOverwriteMobile:"270px",paths:s}))})]})},oo={content:"_content_wsx1m_1",firstSection:"_firstSection_wsx1m_8"},Ol=({content:e,customLargeSection:n,customSlimSection:a,paths:s})=>Array.isArray(e)&&e.length>0&&t.jsx("section",{className:oo.content,children:e.map((o,r)=>r===0?t.jsx("div",{style:n,className:oo.firstSection,children:t.jsx(mt,{...o,isVertical:!0,textPosition:"start",heightImageOverwrite:"512px",heightImageOverwriteMobile:"270px",paths:s})},r):t.jsx("section",{style:a,children:b.createElement(mt,{...o,key:r,isVertical:!0,textPosition:"start",heightImageOverwrite:"512px",heightImageOverwriteMobile:"270px",paths:s})},r))}),Bt={content:"_content_1n73e_1",sectionDescription:"_sectionDescription_1n73e_13",title:"_title_1n73e_33",subtitle:"_subtitle_1n73e_47",linkStyled:"_linkStyled_1n73e_58"},ro=e=>t.jsxs("div",{className:Bt.content,children:[e?.mainNew?.info.section&&t.jsx(T,{className:Bt.sectionDescription,href:e?.mainNew?.info?.section?.url,children:e?.mainNew?.info?.section?.name}),t.jsx(T,{className:Bt.title,href:e?.mainNew?.info?.link?.url,target:e?.mainNew?.info?.link?.target,children:e?.mainNew?.main?.title.home}),e?.mainNew?.main?.subtitle?.rendered&&t.jsx("p",{className:Bt.subtitle,children:e?.mainNew?.main?.subtitle?.striped}),e.goTo&&t.jsx(T,{href:e.goTo.url,className:Bt.linkStyled,children:e.goTo.description})]}),ta={headerSection:"_headerSection_drjnj_1",headerSectionLink:"_headerSectionLink_drjnj_12",newsContent:"_newsContent_drjnj_17"},io=e=>{const{content:n,title:a,isVideo:s}=e;if(!n||!n[0]||n.length===0)return;const o=e.slot_id&&e.slot_id!=="Nota_1",r={...n[0],main:{...n[0].main,title:{...n[0].main.title,section:o?n[0].main.title.home:n[0].main.title.section}}},i=n.slice(1);return r&&i&&t.jsxs(te,{title:a,titleUrl:e.titleUrl,children:[t.jsxs("div",{className:ta.headerSection,children:[t.jsx(ro,{mainNew:r,goTo:e.goTo}),t.jsx(T,{className:ta.headerSectionLink,href:r?.info?.link?.url,target:r?.info?.link?.target,children:t.jsx(ge,{preview:r.preview})})]}),t.jsxs("div",{className:ta.newsContent,children:[t.jsx("div",{className:"banner-context",style:{order:1},children:e.banner}),Array.isArray(i)&&i.map((l,d)=>{const c={...l,main:{...l.main,title:{...l.main.title,section:o?l.main.title.home:l.main.title.section}}};return t.jsx("div",{style:{order:d},children:t.jsx(Ee,{...c,isVideo:s,paths:e.paths})},d)})]})]})},Pe={content:"_content_1stvq_1",autorContent:"_autorContent_1stvq_8",image:"_image_1stvq_24",contentIcon:"_contentIcon_1stvq_25",boxInformationContent:"_boxInformationContent_1stvq_47",autorName:"_autorName_1stvq_53",time:"_time_1stvq_85",comment:"_comment_1stvq_98",title:"_title_1stvq_107"},pn=async e=>{const{data:n,autorIcon:a}=e,s=a,o=()=>n?.config?.showtime?`${ye(n.info?.date?.modified)}`:"",r=t.jsxs("div",{className:Pe.autorContent,children:[Array.isArray(n?.authors)&&Array.isArray(n?.authors[0]?.image?.sizes)&&n?.authors[0]?.image?.sizes?.length>0?t.jsx("img",{fetchPriority:"low",loading:"lazy",className:Pe.image,src:await ne(n?.authors[0]?.image?.sizes[0]?.url||""),alt:n?.authors[0]?.fullname}):t.jsx("div",{className:Pe.contentIcon,children:t.jsx(s,{})}),t.jsx("p",{className:Pe.autorName,children:be(n?.authors[0]?.fullname??"Redacción",18)}),t.jsx("p",{className:Pe.time,children:o()})]});return t.jsxs("div",{className:Pe.content,children:[n?.authors[0]?.internaluser?t.jsx(T,{href:n.authors[0]?.internaluser?`/${e.paths.autor}/${n?.authors[0]?.name}`:"#",children:r}):r,t.jsxs("div",{className:Pe.boxInformationContent,children:[t.jsx(T,{className:Pe.title,href:n?.info?.link?.url,target:n?.info?.link?.target,children:n?.main?.title?.home}),t.jsx("p",{className:Pe.comment,children:be(n?.main?.subtitle?.striped||"")})]})]})},ft={content:"_content_1d7mg_1",boxPosition:"_boxPosition_1d7mg_8",contentFlex:"_contentFlex_1d7mg_21",bannerContent:"_bannerContent_1d7mg_29",bannerContentAux:"_bannerContentAux_1d7mg_40"};function Ql(e){const n=new Array(e.length),a=e.length/2;for(let s=0;s<e.length;s++)s%2===0?n[Math.floor(s/2)]=e[s]:n[a+Math.floor(s/2)]=e[s];return n}const jl=e=>{const{isOpinion:n=!1}=e,a=r=>t.jsx("div",{className:ft.boxPosition+" banner-context",style:{order:2},children:t.jsx("div",{className:ft.bannerContentAux,children:t.jsx("div",{style:{position:"absolute",height:"270px",top:"0"},children:e.banner})})},r),s=[];for(let r=0;r<e.news.length;r++){const i=e.news[r];r===2&&s.push(a(r)),i&&s.push(t.jsx("div",{className:ft.boxPosition,style:{order:r},children:t.jsx(pn,{data:i,autorIcon:e.autorIcon,paths:e.paths})},`description-block-2-odd-${r}`))}const o=s.length%2===0?Ql(s):s;return t.jsx("section",{style:e.customStyles,children:t.jsx(te,{title:e.title,titleUrl:e.titleUrl,isOpinion:n,children:t.jsxs("div",{className:ft.content,children:[t.jsx("div",{className:ft.contentFlex,children:o}),t.jsx("div",{className:ft.bannerContent,children:e.halfPageBanner})]})})})},lo={content:"_content_w9viv_1",title:"_title_w9viv_10"},Gl=e=>{const{showTitle:n=!0}=e;return t.jsxs("div",{className:lo.content,children:[n&&t.jsx("p",{className:lo.title,children:"Editorial"}),t.jsx(it,{...e,info:{...e.info,section:{name:"",slug:"",url:""}}})]})},gt={content:"_content_1nd2h_1",newsContent:"_newsContent_1nd2h_8",boxPosition:"_boxPosition_1nd2h_17",bannerContent:"_bannerContent_1nd2h_23",bannerContentAux:"_bannerContentAux_1nd2h_33"},$l=e=>{const{news:n}=e;return Array.isArray(n)&&t.jsxs("div",{className:gt.content,children:[t.jsxs("div",{className:gt.newsContent,children:[e.bannerArray&&e.bannerArray.map((a,s)=>t.jsx("div",{className:gt.boxPosition+" banner-context",style:{order:2+5*s},children:t.jsx("div",{className:gt.bannerContentAux,children:t.jsx("div",{style:{position:"absolute",height:"270px",top:"0"},children:a})})},s)),n.map((a,s)=>t.jsx("div",{className:gt.boxPosition,style:{order:s},children:t.jsx(Ee,{...a,share:e.share,paths:e.paths})},s))]}),t.jsx("div",{className:gt.bannerContent,children:e.halfPageBanner})]})},zl=e=>t.jsxs(t.Fragment,{children:[t.jsx($s,{className:"display-on-lower-900px",...e}),t.jsx(zs,{...e})]}),An={newsContent:"_newsContent_gd57q_1",newsContentWithLines:"_newsContentWithLines_gd57q_8",newsContentWithoutLines:"_newsContentWithoutLines_gd57q_13",contentSeparator:"_contentSeparator_gd57q_18"},co=e=>{const{content:n}=e;if(!n||n.length===0)return;const a=i=>e.hasLines&&(i+1)%3!==0?An.contentSeparator:"",s=[];let o=0,r=1;for(let i=0;i<n.length;i++){e.banners&&e.bannerPositionIndex?.includes(i)&&(s.push(t.jsx("section",{className:a(o),children:e.banners?.some(h=>h.key===`${e.slot_id}_${r}`)&&t.jsx(ae,{banners:e.banners,name:`${e.slot_id}_${r}`})},o)),o++,r++);const l=e.isVideo?nt(n[i],e.showVideoTime,e.showVideosubtitle):n[i];if(!l)continue;const d=e.slot_id&&e.slot_id!=="Nota_1",c={...l,main:{...l.main,title:{...l.main.title,section:d?l.main.title.home:l.main.title.section}}};s.push(t.jsx("section",{className:a(o),children:t.jsx(Ee,{...c,isVideo:e.isVideo,paths:e.paths})},o)),o++}return s.length===2&&s.push(t.jsx("div",{},o)),t.jsx("div",{className:`${e.hasLines?An.newsContentWithLines:An.newsContentWithoutLines} ${An.newsContent}`,children:s})},na=e=>t.jsx(te,{title:e.title,titleUrl:e.titleUrl,children:t.jsx(co,{content:e.content,paths:e.paths,slot_id:e.slot_id,hasLines:e.hasLines,bannerPositionIndex:e.bannerPositionIndex,isVideo:e.isVideo,banners:e.banners,showVideoTime:e.showVideoTime,showVideosubtitle:e.showVideosubtitle})}),ho={newsContent:"_newsContent_1sb62_1",contentSeparator:"_contentSeparator_1sb62_8"},uo=e=>{const{content:n,title:a}=e;if(!(!n||n.length===0||!Array.isArray(n)))return t.jsx(te,{title:a,titleUrl:e.titleUrl,children:t.jsx("div",{className:`${ho.newsContent} ${e.hasLines?ho.contentSeparator:""}`,children:n?.map((s,o)=>{const r=e.slot_id&&e.slot_id!=="Nota_1",i={...s,main:{...s.main,title:{...s.main.title,section:r?s.main.title.home:s.main.title.section}}};return t.jsx("section",{children:t.jsx(Ee,{...i,share:e.share,paths:e.paths})},o)})})})},aa={newsContent:"_newsContent_1gbse_1",contentSeparator:"_contentSeparator_1gbse_8",newsContentWhitoutLine:"_newsContentWhitoutLine_1gbse_29"},mo=e=>{const{content:n,title:a}=e;if(!(!n||n.length===0))return t.jsx(te,{title:a,titleUrl:e.titleUrl,children:t.jsx("div",{className:`${aa.newsContent} ${e.hasLines?aa.contentSeparator:aa.newsContentWhitoutLine}`,children:n.map((s,o)=>{const r=e.slot_id&&e.slot_id!=="Nota_1",i={...s,main:{...s.main,title:{...s.main.title,section:r?s.main.title.home:s.main.title.section}}};return t.jsx("section",{children:t.jsx(Ee,{...i,share:e.share,paths:e.paths})},o)})})})},sa={headerSection:"_headerSection_1m1sp_3",headerSectionLink:"_headerSectionLink_1m1sp_16",newsContent:"_newsContent_1m1sp_29"},fo=e=>{const{content:n,title:a,isVideo:s=!0}=e;if(!n||n.length===0)return;const o=n[0],r=e.slot_id&&e.slot_id!=="Nota_1",i=n.slice(1);return o&&i&&t.jsxs(te,{title:a,titleUrl:e.titleUrl,children:[t.jsxs("div",{className:sa.headerSection,children:[t.jsx(ro,{goTo:e.goTo,mainNew:nt(o)}),t.jsx(T,{className:sa.headerSectionLink,href:o?.info?.link.url,target:o?.info?.link.target,"aria-label":"Video",children:t.jsx(ge,{preview:{sizes:o?.main?.image.sizes,description:o?.main?.image.description},isVideo:s,isLarge:!0})})]}),t.jsxs("div",{className:sa.newsContent,children:[t.jsx("div",{className:"banner-context",style:{order:1},children:e.banner}),Array.isArray(i)&&i.map((l,d)=>{const c=nt(l),h={...c,main:{...c.main,title:{...c.main.title,section:r?c.main.title.home:c.main.title.section}}};return t.jsx("div",{style:{order:d},children:b.createElement(Ee,{...h,isVideo:s,key:d,paths:e.paths})},d)})]})]})},Lt={content:"_content_1qdkl_1",linkImage:"_linkImage_1qdkl_30",sectionDescription:"_sectionDescription_1qdkl_42",dateText:"_dateText_1qdkl_62",textContent:"_textContent_1qdkl_73"},Hl=async e=>{const{showNewsLikeTitle:n=!1}=e;return e&&e.info?t.jsxs("section",{className:Lt.content,style:{"--heightImageOverwrite":"100%"},children:[t.jsx(T,{className:Lt.linkImage,target:e?.info?.link?.target,title:e.main?.title?.section,href:n?e.info.link.url:e?.info?.section?.url,children:t.jsx(ge,{preview:e.preview})}),t.jsxs("div",{className:Lt.textContent,children:[t.jsx(T,{className:Lt.sectionDescription,target:e?.info?.link?.target,href:n?e.info.link.url:e?.info?.section?.url,children:(n?e?.main?.title?.section:e?.info?.section?.name)??""}),t.jsx("p",{className:Lt.dateText,children:ye(e?.info?.date?.modified)})]})]}):null},go={content:"_content_yx3zm_1",contentSeparator:"_contentSeparator_yx3zm_7"},oa={newsContent:"_newsContent_1uamf_1",contentSeparator:"_contentSeparator_1uamf_8",hasLinesBlock:"_hasLinesBlock_1uamf_40"},po=e=>{if(!e.content||e.content.length===0)return;const n=e.slot_id&&e.slot_id!=="Nota_1";return t.jsx(te,{title:e.title,children:t.jsx("div",{className:`${go.content} ${e.hasLines?go.contentSeparator:""}`,style:{gap:e.hasLines?"30px":"0px"},children:Array.isArray(e.content)&&e.content?.map((a,s)=>{const o={...a,main:{...a.main,title:{...a.main.title,section:n?a.main.title.home:a.main.title.section}}};return t.jsx("section",{className:e.hasLines?oa.hasLinesBlock:"",children:b.createElement(Hl,{...o,key:s,showNewsLikeTitle:e.showNewsLikeTitle})},s)})})})},Ao=e=>{const{content:n,title:a,slot_id:s}=e,o=e.slot_id&&e.slot_id!=="Nota_1";return n&&n.length!==0&&t.jsx(te,{title:a,titleUrl:e.titleUrl,children:t.jsx(Ze,{slot_id:s,cardWidth:e.cardWidth,cardGap:e.cardGap,visibleItems:e.visibleItems,pagination:e.pagination,children:n.map((r,i)=>{const l={...r,main:{...r.main,title:{...r.main.title,section:o?r.main.title.home:r.main.title.section}}};return t.jsx("div",{style:{"--heightImageOverwrite":e.heightImageOverwrite,"--heightImageOverwriteMobile":e.heightImageOverwriteMobile},children:t.jsx(Ut,{...l,paths:e.paths})},i)})})})},Ve={content:"_content_1mj79_1",imageStyled:"_imageStyled_1mj79_14",contentIcon:"_contentIcon_1mj79_23",boxInformation:"_boxInformation_1mj79_44",comment:"_comment_1mj79_51",title:"_title_1mj79_60",authorName:"_authorName_1mj79_81"},Vl=async e=>{const{data:n}=e;return t.jsxs("div",{className:Ve.content,children:[Array.isArray(n.authors)&&n?.authors[0]?.image?t.jsx("img",{fetchPriority:"low",loading:"lazy",className:Ve.imageStyled,src:await ne(n?.authors[0]?.image?.sizes[0]?.url||""),alt:n?.authors[0]?.fullname}):t.jsx("div",{className:Ve.contentIcon,children:e.autorIcon}),t.jsxs("div",{className:Ve.boxInformation,children:[t.jsx("p",{className:Ve.authorName,children:n?.authors[0]?.internaluser?t.jsx(T,{href:n.authors[0]?.internaluser?`/${e.paths.autor}/${n?.authors[0]?.name}`:"#",children:n?.authors[0]?.fullname??"Redacción"}):n?.authors[0]?.fullname??"Redacción"}),t.jsx("p",{className:Ve.title,children:t.jsx(T,{className:Ve.linkStyled,href:n?.info?.link?.url,target:n?.info?.link?.target,children:be(n?.main?.title?.home,40)})}),t.jsx("p",{className:Ve.comment,children:n?.main?.subtitle?.striped})]})]})},wo=e=>{const n=e.slot_id&&e.slot_id!=="Nota_1";return t.jsx(te,{titleUrl:e.titleUrl,title:e.title,children:t.jsx(Ze,{slot_id:e.slot_id,cardGap:31,cardWidth:344,visibleItems:3,children:e.content&&e.content.map((a,s)=>{const o={...a,main:{...a.main,title:{...a.main.title,section:n?a.main.title.home:a.main.title.section}}};return t.jsx(Vl,{autorIcon:e.autorIcon,data:o,paths:e.paths},s)})})})},Oe={content:"_content_1elhb_1",newsContentSection:"_newsContentSection_1elhb_5",itemContent:"_itemContent_1elhb_10",ItemCustomContent:"_ItemCustomContent_1elhb_16"},wn=e=>{const{item:n,option:a}=e;switch(a){case"ediciones":return t.jsx("div",{className:Oe.ItemCustomContent});case"columnistasnacionales":return t.jsx("div",{className:Oe.ItemCustomContent,children:t.jsx(pn,{data:n,autorIcon:e.autorIcon,paths:e.paths})});case"columnistaslocales":return t.jsx("div",{className:Oe.ItemCustomContent,children:t.jsx(pn,{data:n,autorIcon:e.autorIcon,paths:e.paths})});case"columnistas":return t.jsx("div",{className:Oe.ItemCustomContent,children:t.jsx(pn,{data:n,autorIcon:e.autorIcon,paths:e.paths})});default:return t.jsx("div",{className:Oe.ItemCustomContent,children:t.jsx(Ee,{...n,paths:e.paths})})}},Fl=e=>{const{data:n,currentPage:a,banners:s,slug:o,ranking:r,pathname:i,texts:l={}}=e,d=[3,8,13],c={3:1,8:2,13:3};switch(e.option){case"op1":return t.jsx(Jn,{ranking:r,readestTitle:l.readestTitle??"",paths:e.paths,bannerTop:t.jsx(ae,{banners:s??[],name:"right_1"}),banner:t.jsx(ae,{banners:s??[],name:"right_2"}),children:t.jsx("section",{className:Oe.content,children:n.length>0?t.jsx(un,{className:[Oe.newsContentSection,"padding-0"].join(" "),paginatorComponent:t.jsx(Et,{texts:l,pathname:i,query:"",currentPage:a,maxPages:e.PAGINATION_MAX_PAGES,showNext:!(n.length<e.NEWS_PER_SECTION)}),children:Array.isArray(n)&&n?.map((h,u)=>t.jsxs(b.Fragment,{children:[d.includes(u+1)&&t.jsx("div",{className:Oe.itemContent+" banner-context",children:t.jsx(ae,{banners:s??[],name:`block_2_${c[u+1]}`})}),t.jsx(wn,{autorIcon:e.autorIcon,item:h,option:o,paths:e.paths},u)]},u))}):t.jsx("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",gap:"2rem"},children:t.jsx("p",{style:{fontWeight:"var(--fw)",width:"100%",fontSize:"18px",lineHeight:"26px",textAlign:"center"},children:l.sectionNotResultMessage})})})});case"op2":return t.jsx(t.Fragment,{children:n.length>0?t.jsx(un,{className:"padding-0",paginatorComponent:t.jsx(Et,{texts:l,pathname:i,query:"",currentPage:a,maxPages:e.PAGINATION_MAX_PAGES,showNext:!(n.length<e.NEWS_PER_SECTION)}),children:Array.isArray(n)&&n?.map((h,u)=>t.jsxs(b.Fragment,{children:[d.includes(u+1)&&t.jsx("div",{className:Oe.itemContent,children:t.jsx(ae,{banners:s??[],name:`block_2_${c[u+1]}`})}),t.jsx(wn,{autorIcon:e.autorIcon,item:h,option:o,paths:e.paths},u)]},u))}):t.jsx("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",gap:"2rem"},children:t.jsx("p",{style:{fontWeight:"var(--fw)",width:"100%",fontSize:"18px",lineHeight:"26px",textAlign:"center"},children:l.sectionNotResultMessage})})});default:return t.jsx(t.Fragment,{})}},yo={content:"_content_gwsqy_1",contactInfoContent:"_contactInfoContent_gwsqy_7"},Wl=e=>{const{data:n}=e;return t.jsx("section",{className:yo.content,children:n.map((a,s)=>t.jsx("div",{className:yo.contactInfoContent,dangerouslySetInnerHTML:{__html:a.body.rendered}},s))})},ra={tagContent:"_tagContent_ee6yw_1",contentLayout2:"_contentLayout2_ee6yw_9",contentHeader:"_contentHeader_ee6yw_42"},Yl={content:"_content_1rbrt_1"},Kl=({children:e,className:n=""})=>t.jsx("div",{className:`content-layout-2 ${Yl.content} ${n}`,children:e}),Dt={container:"_container_1insg_1",note:"_note_1insg_10",commercial:"_commercial_1insg_50",commercialContent:"_commercialContent_1insg_67",complement:"_complement_1insg_83"},Jl=e=>t.jsxs("section",{className:Dt.container,children:[t.jsx("div",{className:Dt.note,children:e.children}),t.jsx("div",{className:Dt.commercial,children:t.jsxs("div",{className:Dt.commercialContent,children:[e.slug==="liveblogs"&&t.jsx(Ks,{itemList:e.itemList}),e.bannerTop,t.jsx(rn,{content:e.ranking,title:e.texts.readestTitle,paths:e.paths,customNewsDescriptionStyles:{"--news-description-title-size-desk":"16px","--news-description-title-line-height-desk":"22px","--news-description-title-size-mobile":"16px","--news-description-title-line-height-mobile":"22px"}}),t.jsx("div",{style:{position:"sticky",top:"110px"},children:e.banner})]})}),t.jsx("div",{className:Dt.complement,children:e.complement})]}),Zl=e=>{const n={...e.news[0],config:{zonehome:void 0,priorityhome:"",zonesection:"",prioritysection:",",homepreview:"",showcomments:!1,showtime:!1,showauthor:!1,showuppertitle:!1,showsubtitle:!0,showads:!1},main:{...e.news[0]?.main,title:{...e.news[0]?.main.title,section:e.news[0]?.main.title.article??""}},info:{...e.news[0]?.info,link:{url:void 0,target:void 0}}};switch(e.option){case"liveblogs":return t.jsx("div",{style:{"--news-description-title-size-desk":"38px","--news-description-title-size-mobile":"30px","--news-description-title-line-height-desk":"46px","--news-description-title-line-height-mobile":"38px","--news-image-height-desk":"600px","--news-image-height-mobile":"420px","--news-image-description-display":"none"},children:t.jsx(Ys,{...n,fontSizeSubTitle:"18px",lineHeightSubTitle:"28px"})});default:return t.jsx("div",{className:ra.contentHeader,style:{"--section-card-chip-padding":"0 0 0 6px","--uppertitle-display":"block","--news-description-title-size-desk":"38px","--news-description-title-size-mobile":"30px","--news-description-title-line-height-desk":"46px","--news-description-title-line-height-mobile":"38px","--news-description-content-gap":"0px","--section-card-chip-margin":"0 0 10px","--news-description-subtitle-margin":"22px 0 0"},children:t.jsx(it,{...n,fontSizeSubTitle:"18px",lineHeightSubTitle:"28px",cutSubtitle:!1,colorSubTitle:"black",isTitle:!0,paths:e.paths})})}},Qe={content:"_content_jrssz_1",contentWithinCard:"_contentWithinCard_jrssz_7",contentDate:"_contentDate_jrssz_13",dateInfo:"_dateInfo_jrssz_20",dot:"_dot_jrssz_30",contentTitle:"_contentTitle_jrssz_38",contentTextList:"_contentTextList_jrssz_47",contentButton:"_contentButton_jrssz_101",linkStyled:"_linkStyled_jrssz_107"},Xl={content:"_content_ifkxj_1"},Rl=e=>t.jsx("section",{className:Xl.content,id:e.id,children:e.children}),ec=e=>e.replace(/<p>(\s|&nbsp;)+<\/p>/g,""),tc=e=>{const n=/src="\/(.*?)"/g;return e.replace(n,`src="${At()}/$1"`)},bo={2:1,4:2,7:3,10:4,13:5};function nc(e){return e.replace(/<script[^>]*src=["']https:\/\/platform\.twitter\.com\/widgets\.js["'][^>]*><\/script>/gi,"")}const ac=async({itemList:e,slug:n,banners:a,texts:s})=>{if(!e||e.length===0||!e[0])return;const o=e[0].list?.items?.map(r=>{const i=ec(r.body.rendered);let l=tc(i);return l=nc(l),{...r,body:{...r.body,rendered:l}}});return t.jsx("section",{className:Qe.content,id:"block-notes-list",children:o?.map((r,i)=>t.jsxs(b.Fragment,{children:[t.jsx(Rl,{id:`item-${i+1}`,children:t.jsxs("div",{className:Qe.contentWithinCard,children:[r.date>0&&t.jsxs("div",{className:Qe.contentDate,children:[t.jsx("span",{className:Qe.dot,style:{background:n==="liveblogs"?"var(--news-liveblog-timeline-datelink-dot-color)":"var(--common-black)"}}),t.jsx("p",{className:Qe.dateInfo,style:{color:n==="liveblogs"?"var(--news-liveblog-timeline-datelink-color)":"var(--common-black)"},children:En(r.date)})]}),t.jsx("p",{className:Qe.contentTitle,children:e[0]?.list.integrated?r.title:`${r.index}. ${r.title}`}),r.image&&t.jsx(ge,{preview:r.image,isLarge:!0}),t.jsx("div",{className:Qe.contentTextList,dangerouslySetInnerHTML:{__html:r.body.rendered}}),r.related&&t.jsx("div",{className:Qe.contentButton,children:t.jsx("a",{className:Qe.linkStyled,href:r.related??"",target:"”_blank",children:s.blockNoteList_readMore??"Leer Más"})})]})},i),bo[i]&&t.jsx(ae,{banners:a,name:"list_"+bo[i]},i)]},i))})},sc={FaceBook:"facebook",Instagram:"instagram",WhatsApp:"whatsapp",TikTok:"tiktok",Youtube:"youtube",X:"x",Gnews:"gnews",Podcast:"podcast",Telegram:"telegram"};function oc({url:e}){return e&&e!==""&&t.jsxs(T,{href:e,className:R.googleProfileButton,children:[t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",children:t.jsx("path",{fill:"currentColor",d:"M15.583 9.083h-6.5v6.5H6.916v-6.5h-6.5V6.917h6.5v-6.5h2.167v6.5h6.5v2.166Z"})}),"Síguenos en",t.jsx(rc,{})]})}const rc=()=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 272 92",width:"272",height:"92",children:[t.jsx("path",{fill:"#EA4335",d:"M115.75 47.18c0 12.77-9.99 22.18-22.25 22.18s-22.25-9.41-22.25-22.18C71.25 34.32 81.24 25 93.5 25s22.25 9.32 22.25 22.18zm-9.74 0c0-7.98-5.79-13.44-12.51-13.44S80.99 39.2 80.99 47.18c0 7.9 5.79 13.44 12.51 13.44s12.51-5.55 12.51-13.44z"}),t.jsx("path",{fill:"#FBBC05",d:"M163.75 47.18c0 12.77-9.99 22.18-22.25 22.18s-22.25-9.41-22.25-22.18c0-12.85 9.99-22.18 22.25-22.18s22.25 9.32 22.25 22.18zm-9.74 0c0-7.98-5.79-13.44-12.51-13.44s-12.51 5.46-12.51 13.44c0 7.9 5.79 13.44 12.51 13.44s12.51-5.55 12.51-13.44z"}),t.jsx("path",{fill:"#4285F4",d:"M209.75 26.34v39.82c0 16.38-9.66 23.07-21.08 23.07-10.75 0-17.22-7.19-19.66-13.07l8.48-3.53c1.51 3.61 5.21 7.87 11.17 7.87 7.31 0 11.84-4.51 11.84-13v-3.19h-.34c-2.18 2.69-6.38 5.04-11.68 5.04-11.09 0-21.25-9.66-21.25-22.09 0-12.52 10.16-22.26 21.25-22.26 5.29 0 9.49 2.35 11.68 4.96h.34v-3.61h9.25zm-8.56 20.92c0-7.81-5.21-13.52-11.84-13.52-6.72 0-12.35 5.71-12.35 13.52 0 7.73 5.63 13.36 12.35 13.36 6.63 0 11.84-5.63 11.84-13.36z"}),t.jsx("path",{fill:"#34A853",d:"M225 3v65h-9.5V3h9.5z"}),t.jsx("path",{fill:"#EA4335",d:"M262.02 54.48l7.56 5.04c-2.44 3.61-8.32 9.83-18.48 9.83-12.6 0-22.01-9.74-22.01-22.18 0-13.19 9.49-22.18 20.92-22.18 11.51 0 17.14 9.16 18.98 14.11l1.01 2.52-29.65 12.28c2.27 4.45 5.8 6.72 10.75 6.72 4.96 0 8.4-2.44 10.92-6.14zm-23.27-7.98l19.82-8.23c-1.09-2.77-4.37-4.7-8.23-4.7-4.95 0-11.84 4.37-11.59 12.93z"}),t.jsx("path",{fill:"#4285F4",d:"M35.29 41.41V32H67c.31 1.64.47 3.58.47 5.68 0 7.06-1.93 15.79-8.15 22.01-6.05 6.3-13.78 9.66-24.02 9.66C16.32 69.35.36 53.89.36 34.91.36 15.93 16.32.47 35.3.47c10.5 0 17.98 4.12 23.6 9.49l-6.64 6.64c-4.03-3.78-9.49-6.72-16.97-6.72-13.86 0-24.7 11.17-24.7 25.03 0 13.86 10.84 25.03 24.7 25.03 8.99 0 14.11-3.61 17.39-6.89 2.66-2.66 4.41-6.46 5.1-11.65l-22.49.01z"})]}),ic=async e=>{if(!e.news||!e.news.authors)return null;const{news:n,socials:a,texts:s}=e,o=n.authors.map(i=>i.internaluser?`<a href="${`/${e.paths.autor}/${i.name}`}">${i.fullname}</a>`:i.fullname).join(", "),r=()=>n.authors.length===1?R.width1Autor:n.authors.length===2?R.width2Autor:n.authors.length===3?R.width3Autor:"";return n.config?.showauthor&&t.jsx("div",{className:R.content,children:t.jsxs("div",{className:R.avatarContent,children:[t.jsx("div",{style:{width:"100%"},"data-hydrate":"ShareButtons","data-props":encodeURIComponent(JSON.stringify({noteShare:e.noteShare})),children:t.jsx(Vs,{noteShare:e.noteShare})}),t.jsx(oc,{url:e.noteShare?.googleProfile??""}),t.jsxs("section",{className:R.journalistSection,children:[t.jsx("div",{className:`${R.imageContent} ${r()}`,style:{width:`${n.authors?.length>2?n.authors?.length*30:n.authors?.length*35}px`},children:Array.isArray(n.authors)&&n.authors?.map(async(i,l)=>i.image?t.jsx("img",{fetchPriority:"low",loading:"lazy",alt:"autor",className:`${R.imageStyled} ${R.imageAutor} `,src:await ne(i.image.sizes[0]?.url||"")},i.fullname):t.jsx("div",{className:`${R.contentIconStyled} ${R.imageAutor}`,children:e.autorIcon},i.fullname))}),o&&t.jsx("div",{className:R.journalistInfoLink,dangerouslySetInnerHTML:{__html:`${s.JournalistPrefix} <h3 style="padding:0px;">${o??"Redaccion"}${n.config?.showtime&&","}</h3> ${n.config?.showtime?En(n.info.date.modified):null}`}})]})]})})},yn={content:"_content_opb3u_1",journalistArticleContent:"_journalistArticleContent_opb3u_15",contentNews:"_contentNews_opb3u_35",noteSource:"_noteSource_opb3u_392"},lc={summaryContent:"_summaryContent_wsypg_1"},cc=async({summary:e})=>e&&e.rendered&&t.jsx("section",{className:lc.summaryContent,dangerouslySetInnerHTML:{__html:e.rendered}}),ia=async({newsformated:e,internal:n})=>{if(!n)return;const a=new fe,s=e.preview.sizes,r=(await a.getNewsMultimedia({path:n,imagesizes:s?s[0]?.scale:"w:801,h:449,t:2;"}))?.data.data[0]?.gallery??[];return t.jsxs("div",{className:mn.content,children:[t.jsx(Ze,{slot_id:"header",fullPageWidth:!0,visibleItems:1,pagination:!0,cardGap:0,children:r&&r.map((i,l)=>t.jsx(ge,{preview:i,priorityHigh:!0},l))}),t.jsx("div",{className:mn.description,children:r&&r[0]?.description})]})};function dc(e){const n=e.children,a=`${e.slot_id}-`,s=e.visibleItems,o=e.cardGap??20;function r(l){const d=[],c=[];let h="",u=!0;for(let f=0;f<l;f++){const y=`[data-index="${f}"]:checked ~ .carrousel-pagination li:nth-child(${f+1}) {
44
44
  background-color:var(--carrousel-pagination-background-color)
@@ -108,4 +108,4 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
108
108
  ${m}
109
109
  <figcaption>${u.data.data[0].main.description||""}</figcaption>
110
110
  </figure>
111
- `}o+=y,r=h}return o+=e.slice(r),o}async function wc(e){const{news:n,banners:a,newsRelatedResponses:s,slug:o,itemList:r,socials:i,getVideos:l}=e;let d=n?.body?.rendered??"";d=d.replace(/&nbsp;/g,""),d=fc(d,a),d=gc(d),d=await Co(d),d=await pc(d,e.texts,s),d=await Ac(d,l),d=uc(d),d=mc(d);const c=n.main.sources??[];return t.jsxs("div",{className:yn.content,children:[o!=="liveblogs"||e.showHeaderImage?n.hascontent?.hasgalleryimages?t.jsx(ia,{newsformated:n,internal:n.info.link.internal}):t.jsx(Ws,{preview:n.preview}):null,t.jsx(ae,{banners:a,name:"block_1"}),t.jsx("div",{className:yn.journalistArticleContent,children:t.jsx(ic,{autorIcon:e.autorIcon,socials:i,news:n,texts:e.texts,noteShare:e.noteShare,paths:e.paths})}),t.jsx(cc,{summary:n.main.summary}),t.jsx("div",{className:yn.contentNews,suppressHydrationWarning:!0,id:"content-news-section",dangerouslySetInnerHTML:{__html:d}}),t.jsx(ac,{texts:e.texts,itemList:r,banners:a,slug:o}),c.length>0&&t.jsxs("div",{className:yn.noteSource,children:[t.jsx(hc,{}),t.jsx("p",{children:e.texts.noteSource+(c.length===1?"":"s")+": "+c.map(h=>h.name).join(", ")})]})]})}const vo={content:"_content_cu8lm_1",title:"_title_cu8lm_18"},yc=async({newsformated:e,internal:n})=>{if(!n)return;const s=await new fe().getNewsMultimedia({path:n,imagesizes:e.preview.sizes[0]?.scale});if(!s)return;const o=s.data.data[0]?.videos.filter(r=>r.type==="video-embedded")[0];return t.jsxs("div",{className:vo.content,children:[t.jsx("div",{dangerouslySetInnerHTML:{__html:o?.code??""}}),t.jsx("p",{className:vo.title,children:o?.title})]})},la={content:"_content_cu8lm_1",title:"_title_cu8lm_18"},bc=async({newsformated:e,internal:n})=>{if(!n)return;const s=await new fe().getNewsMultimedia({path:n,imagesizes:e.preview.sizes[0]?.scale});if(!s)return;const o=s.data.data[0]?.videos.filter(r=>r.type==="video-youtube")[0];return t.jsxs("div",{className:la.content,children:[t.jsx("iframe",{className:la.iframeStyled,src:`https://www.youtube.com/embed/${o?.code??""}`,frameBorder:"0",allowFullScreen:!0}),t.jsx("p",{className:la.title,children:o?.title})]})},Cc={content:"_content_ezbiw_1"},vc=async({newsformated:e,internal:n})=>{if(!n)return;const s=await new fe().getNews({path:n,imagesizes:e.preview.sizes[0]?.scale});if(!s)return;const o=s.data.data[0]?.external?.iframe;return t.jsx("div",{className:Cc.content,dangerouslySetInnerHTML:{__html:o??""}})},_o={content:"_content_156j7_1"},Fe={imagen:"imagen",videoEmbedded:"videoEmbedded",videoYouTube:"videoYouTube",iframe:"iframe"},_c={[Fe.videoEmbedded]:yc,[Fe.videoYouTube]:bc,[Fe.iframe]:vc},Nc=({news:e})=>{const{config:n,hascontent:a,info:s}=e,o=n.articlepreview,r=s.link.internal,i=a?.hasgalleryimages;if(o===Fe.imagen&&i)return t.jsx("div",{className:_o.content,children:t.jsx(ia,{newsformated:e,internal:r})});const l=o?_c[o]:null;return l?t.jsx("div",{className:_o.content,children:t.jsx(l,{newsformated:e,internal:r})}):null},Sc=e=>{const{content:n,title:a,slot_id:s}=e,o=e.slot_id&&e.slot_id!=="Nota_1";return n&&n.length!==0&&t.jsx(te,{title:a,titleUrl:e.titleUrl,children:t.jsx(Ze,{slot_id:s,cardWidth:200,children:n.map((r,i)=>{const l={...r,main:{...r.main,title:{...r.main.title,section:o?r.main.title.home:r.main.title.section}}};return t.jsx(Ut,{...l,titleGradient:!0,paths:e.paths},i)})})})},kc=e=>{const{content:n,title:a,slot_id:s}=e,o=e.slot_id&&e.slot_id!=="Nota_1";return n&&n.length!==0&&t.jsx(te,{title:a,titleUrl:e.titleUrl,children:t.jsx(Ze,{slot_id:s,cardWidth:343,cardGap:32,visibleItems:3,children:n.map((r,i)=>{const l={...r,main:{...r.main,title:{...r.main.title,section:o?r.main.title.home:r.main.title.section}}};return t.jsx(Ut,{...l,titleGradient:!0,paths:e.paths},i)})})})},Ec=e=>{const{content:n,title:a,slot_id:s}=e,o=e.slot_id&&e.slot_id!=="Nota_1";return n&&n.length!==0&&t.jsx(te,{title:a,titleUrl:e.titleUrl,children:t.jsx(Ze,{slot_id:s,fullPageWidth:!0,visibleItems:1,pagination:!0,cardGap:0,children:n.map((r,i)=>{const l={...r,main:{...r.main,title:{...r.main.title,section:o?r.main.title.home:r.main.title.section}}};return b.createElement(Ut,{...l,key:i,titleGradient:!0,paths:e.paths})})})})},bn=e=>{const n={};for(const a in e)a.startsWith("--")&&(n[a]=e[a]);return n},Xe={headerSection:"_headerSection_1c69w_1",title:"_title_1c69w_11",subtitle:"_subtitle_1c69w_23",newsContent:"_newsContent_1c69w_36",containerCards:"_containerCards_1c69w_44",image:"_image_1c69w_50",blockHeadContainer:"_blockHeadContainer_1c69w_56"},Ic=e=>{const{content:n,title:a,isVideo:s}=e;if(!n||n.length===0)return;const o=n[0],r=n.slice(1),i=e.slot_id&&e.slot_id!=="Nota_1";return o&&r&&t.jsxs(te,{title:a,titleUrl:e.titleUrl,children:[t.jsx("div",{className:Xe.headerSection,children:t.jsxs("a",{style:{"--heightImageOverwriteMobile":"200%"},className:Xe.image,href:o?.info?.link?.url,target:o?.info?.link?.target,children:[t.jsxs("div",{className:Xe.blockHeadContainer,children:[t.jsx("p",{className:Xe.title,children:o?.main?.title.home}),o?.main?.subtitle?.rendered&&t.jsx("p",{className:Xe.subtitle,children:o?.main?.subtitle?.striped})]}),t.jsx(ge,{preview:o.preview})]})}),t.jsxs("div",{className:Xe.containerCards,children:[t.jsx("div",{className:"banner-context",style:{order:1},children:e.banner}),t.jsx("div",{className:Xe.newsContent,children:Array.isArray(r)&&r.map((l,d)=>{const c={...l,main:{...l.main,title:{...l.main.title,section:i?l.main.title.home:l.main.title.section}}};return t.jsx("div",{style:{order:d},children:t.jsx(Ee,{...c,isVideo:s,paths:e.paths})},d)})})]})]})},No={banner:e=>t.jsx(ae,{...e,name:e.slot_id.replace("Home","block")}),readest:e=>t.jsx(rn,{...e}),"Modulo 1x3":e=>t.jsx(na,{...e}),"Modulo 1x4":e=>t.jsx(uo,{...e}),"Modulo 1x5":e=>t.jsx(mo,{...e}),"Destacado noticias":e=>t.jsx(io,{...e}),"Destacado full width":e=>t.jsx(Ic,{...e}),"Destacado videos":e=>t.jsx(fo,{...e}),"Carrusel card":e=>t.jsx(Ao,{...e}),"Carrusel story":e=>t.jsx(Sc,{...e}),"Carrusel owl":e=>t.jsx(kc,{...e}),"Modulo fotogaleria":e=>t.jsx(Ec,{...e}),"Carrusel opinion":e=>t.jsx(wo,{...e}),"Modulo 1x3 card":e=>t.jsx(po,{...e})};function ca({component:e,slot_id:n,data:a,banners:s}){if(s)return No[e]&&t.jsx("div",{className:"home-slot",style:bn(a),children:No[e]({...a,banners:s,slot_id:n})})}function Uc({children:e,stylesConfigEntry:n}){return t.jsx("div",{className:"home-slot",style:bn(n),children:e})}const So={Diario:e=>{if(!e?.data||e.data.length===0)return;const n=e.data.slice(1);return t.jsx(so,{...e.data[0],itemReverseOrder:!0,isLarge:!0,block:n,banners:e.banners,showSuper:e.showSuper,rightOnlyBanner:e.rightOnlyBanner,customSectionCardStyles:e.customSectionCardStyles,customNewsDescriptionStyles:e.customNewsDescriptionStyles,paths:e.paths})},"Diario con imagen":e=>{if(!e?.data||e.data.length===0)return;const n=e.data.slice(1);return t.jsx(so,{...e.data[0],itemReverseOrder:!0,isLarge:!0,showSuper:e.showSuper,block:n,banners:e.banners,customSectionCardStyles:e.customSectionCardStyles,customNewsDescriptionStyles:e.customNewsDescriptionStyles,paths:e.paths})},Super:e=>t.jsx(mt,{...e.data[0],paths:e.paths}),"3 notas verticales":e=>t.jsx(Ol,{content:e.data,customLargeSection:e.customLargeSection,customSlimSection:e.customSlimSection,paths:e.paths}),"3 notas horizontales":e=>t.jsx(Pl,{content:e.data,customLargeSection:e.customLargeSection,customSmallSection:e.customSmallSection,paths:e.paths})},Cn=({component:e,data:n,banners:a,rightOnlyBanner:s})=>t.jsx("div",{style:bn(n),children:So[e]&&So[e]({...n,rightOnlyBanner:s,banners:a})}),Tc=({slots:e,DYNAMIC_SLOT_SUBINDEXES:n,stylesConfig:a,AutorIcon:s,config:o,banners:r})=>{const i=[],d=n,c=Object.keys(e).length/d;for(let h=1;h<=c;h++)for(let u=1;u<=d;u++){const f="Home_"+h+"_"+u;!e[f]||!e[f].blockSass||!e[f].blockSass[0]||!e[f].blockSass[0].value||!e[f].blockSass[0].block||e[f].blockSass[0].block==="No Mostrar"||i.push(t.jsxs(Ls,{show:!!e[f].content?.data,order:(h-1)*d+(u-1),children:[t.jsx(ca,{component:e[f].blockSass[0].block,banners:r,slot_id:f,data:{...e[f].blockSass[0].block?a[e[f].blockSass[0].block]:[],content:e[f].content?.data??[],title:e[f].blockSass[0].title??void 0,titleUrl:e[f].blockSass[0].link??void 0,autorIcon:t.jsx(s,{}),paths:o.paths}}),t.jsx($e,{children:t.jsx(Te,{banners:r,index:"dynamic_"+h+"_"+u})})]},h+"_"+u))}return i},xc=({mainBlock:e,StylesConfigMain:n,config:a,banners:s})=>{const{PUBLIC_ENV:o}=Y();if(o!=="local")return null;const r=e?.news?.data||[],i=(l,d)=>({...e?.news,...n[l],data:r.slice(0,d),paths:a.paths});return t.jsxs(t.Fragment,{children:[t.jsx(Cn,{component:"Super",data:i("Super",1),banners:s}),t.jsx($e,{children:t.jsx(Te,{banners:s,index:1})}),t.jsx(Cn,{component:"3 notas verticales",data:i("3 notas verticales",3),banners:s}),t.jsx($e,{children:t.jsx(Te,{banners:s,index:1})}),t.jsx(Cn,{component:"3 notas horizontales",data:i("3 notas horizontales",3),banners:s}),t.jsx($e,{children:t.jsx(Te,{banners:s,index:1})})]})},qc=e=>{const{config:n,hascontent:a}=e,s=n.articlepreview,o=[Fe.videoEmbedded,Fe.videoYouTube,Fe.iframe];return!!(s===Fe.imagen&&a?.hasgalleryimages||o.includes(s))},Bc=async e=>{const{custom_complement:n,ranking:a=[],banners:s,autor:o=[],news:r=[],newsRelatedResponses:i=[],itemList:l=[],socials:d,getVideos:c}=e,h=e.slug==="liveblogs";if(!(!r||!r[0]))return t.jsx(t.Fragment,{children:t.jsxs(Kl,{className:ra.contentLayout2,children:[t.jsx(Zl,{option:e.slug,news:r,paths:e.paths}),t.jsx(Te,{banners:s,index:1}),!h&&t.jsx(Nc,{news:r[0]}),t.jsx(Jl,{texts:e.texts,paths:e.paths,slug:e.slug,itemList:l,ranking:a,bannerTop:t.jsx(ae,{banners:s??[],name:"right_1"}),banner:t.jsx(ae,{banners:s??[],name:"right_2"}),complement:n||t.jsxs("div",{id:"comentarios",suppressHydrationWarning:!0,children:[o.length>0&&t.jsx(no,{texts:e.texts,autorIcon:e.autorIcon,autor:o[0],paths:e.paths}),r[0].authors.length>1&&t.jsx(ao,{news:r[0],autorIcon:e.autorIcon,paths:e.paths,texts:e.texts}),t.jsx("div",{className:ra.tagContent,children:t.jsx(to,{tags:r[0]?.keywords?.tags,paths:e.paths})}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"2rem"},suppressHydrationWarning:!0,children:[e.showComments&&t.jsx("div",{suppressHydrationWarning:!0,"data-hydrate":"LazyLoader","data-props":encodeURIComponent(JSON.stringify({render:"comment",internalPath:e.internalPath}))}),t.jsx($e,{children:t.jsx(Te,{banners:s,index:2})}),t.jsx(ca,{component:"Carrusel card",banners:[],slot_id:"Nota_1",data:{...e.stylesConfig["Carrusel card"],content:e.relatedNewsList??[],title:e.texts.relatedNewsTitle,titleUrl:void 0}}),t.jsx($e,{children:t.jsx(Te,{banners:s,index:3})}),t.jsx(te,{title:e.texts.moreNewsTitle,children:t.jsx("div",{suppressHydrationWarning:!0,"data-hydrate":"LazyLoader","data-props":encodeURIComponent(JSON.stringify({render:"more",stylesConfig:e.stylesConfig,section:r[0].info.section?.slug??"",currentNews:r[0]}))})}),t.jsx($e,{children:t.jsx(Te,{banners:s,index:4})})]})]}),children:t.jsxs("section",{style:{"--avatar-content-align-items-desk":e.slug==="liveblogs"?"flex-start":"center"},children:[t.jsx(wc,{texts:e.texts,autorIcon:e.autorIcon,socials:d,news:r[0],banners:s,newsRelatedResponses:i,itemList:l,slug:e.slug,getVideos:c,noteShare:e.noteShare,paths:e.paths,showHeaderImage:!qc(r[0])}),t.jsx(ae,{banners:s??[],name:"block_3"})]})})]})})},pt={content:"_content_1tl6i_1",contentInfo:"_contentInfo_1tl6i_24",imageStyled:"_imageStyled_1tl6i_41",name:"_name_1tl6i_46",description:"_description_1tl6i_51",contentInfoWithoutImg:"_contentInfoWithoutImg_1tl6i_104"},Lc=async e=>{const n=e.img?await ne(e.img):"";return t.jsx("section",{className:pt.content,children:t.jsxs("div",{className:`${pt.contentInfo} ${n?"":pt.contentInfoWithoutImg}`,children:[e.img&&t.jsx("img",{fetchPriority:"low",loading:"lazy",className:pt.imageStyled,src:n}),t.jsx("h1",{className:pt.name,children:e.tag}),e.description&&t.jsx("div",{className:pt.description,dangerouslySetInnerHTML:{__html:e.description}})]})})},vn={content:"_content_7wvro_1",contentInfo:"_contentInfo_7wvro_23",name:"_name_7wvro_34",description:"_description_7wvro_43"},Dc=e=>t.jsx("section",{className:vn.content,style:{color:e.textColor,"--backDropHeigth":e.backDropHeigth?e.backDropHeigth:"100%",padding:e.sectionPadding??"","--backgroundColor":e.backgroundColor},children:t.jsxs("div",{className:vn.contentInfo,children:[t.jsx("h1",{className:vn.name,style:{color:e.textColor},children:e.tag}),e.description&&t.jsx("div",{style:{color:e.textColor},className:vn.description,dangerouslySetInnerHTML:{__html:e.description}})]})}),Mc=e=>{const{option:n,entity:a}=e;switch(n){case"op1":return t.jsx(Lc,{tag:a?.name??"",img:a?.image?.url??"",description:a?.description?a?.description:""});case"op2":return t.jsx(Dc,{tag:a?.name??"",description:a?.description?a?.description:"",backDropHeigth:e.backDropHeigth,backgroundColor:e.backgroundColor,sectionPadding:e.sectionPadding,textColor:e.textColor});default:return t.jsx(t.Fragment,{})}},Mt={content:"_content_gxziw_1",buttonStyled:"_buttonStyled_gxziw_9",searchStyled:"_searchStyled_gxziw_21",inputStyled:"_inputStyled_gxziw_32",inputStyledTest:"_inputStyledTest_gxziw_51"},Pc=e=>t.jsx("svg",{width:"68",height:"68",viewBox:"0 0 68 68",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t.jsx("g",{opacity:"0.8",children:t.jsx("path",{d:"M47.8043 46.6003L47.6635 46.7758L47.8232 46.9342L56.4762 55.5171C56.4768 55.5177 56.4774 55.5184 56.478 55.519C56.8524 55.9072 57.0616 56.4256 57.0616 56.965C57.0616 57.5048 56.8521 58.0234 56.4774 58.4117C56.2839 58.6065 56.0539 58.7611 55.8005 58.8667C55.5466 58.9724 55.2743 59.0269 54.9993 59.0269C54.7243 59.0269 54.452 58.9724 54.1981 58.8667C53.9442 58.7609 53.7138 58.6059 53.5201 58.4106L53.5194 58.4099L44.9327 49.8232L44.7743 49.6648L44.5995 49.805C40.4597 53.1252 35.2051 54.7331 29.9162 54.2981C24.6272 53.863 19.706 51.4181 16.1643 47.4661C12.6227 43.514 10.7298 38.3552 10.875 33.0503C11.0201 27.7455 13.1923 22.6979 16.9447 18.9455C20.6972 15.193 25.7448 13.0209 31.0496 12.8757C36.3544 12.7305 41.5133 14.6234 45.4653 18.165C49.4174 21.7067 51.8623 26.6279 52.2974 31.9169C52.7324 37.2058 51.1245 42.4604 47.8043 46.6003ZM22.4528 47.4552C25.1799 49.2774 28.3861 50.25 31.666 50.25C36.0641 50.25 40.2822 48.5029 43.3921 45.3929C46.5021 42.2829 48.2493 38.0649 48.2493 33.6667C48.2493 30.3868 47.2767 27.1806 45.4545 24.4535C43.6323 21.7264 41.0423 19.6008 38.0121 18.3457C34.9819 17.0905 31.6476 16.7621 28.4307 17.402C25.2139 18.0419 22.259 19.6213 19.9398 21.9405C17.6205 24.2597 16.0411 27.2146 15.4013 30.4314C14.7614 33.6483 15.0898 36.9827 16.345 40.0129C17.6001 43.0431 19.7256 45.633 22.4528 47.4552Z",fill:"white",stroke:"white",strokeWidth:"0.5"})})}),Oc=e=>t.jsx("form",{className:Mt.content,style:{height:e.hasContent?"218px":"50vh"},children:t.jsxs("div",{className:Mt.inputStyled,children:[t.jsx("input",{className:Mt.inputStyledTest,defaultValue:e.query,name:"query",placeholder:e.texts.searchKeyWord+"..."}),t.jsx("button",{className:Mt.buttonStyled,type:"submit",children:t.jsx(Pc,{className:Mt.searchStyled})})]})}),da={content:"_content_io3tv_1",newsContentSection:"_newsContentSection_io3tv_5",itemContent:"_itemContent_io3tv_10"},Qc=e=>{const{data:n,option:a,autor:s,page:o,banners:r,pathname:i,ranking:l,currentPage:d,slug:c,texts:h={}}=e,u=[5,10,15],f={5:1,10:2,15:3};switch(a){case"op1":return t.jsx(t.Fragment,{children:t.jsxs(Yn,{children:[t.jsx(Js,{autor:s[0],autorIcon:e.autorIcon}),t.jsx(Jn,{paths:e.paths,ranking:l,readestTitle:h.readestTitle??"",bannerTop:t.jsx(ae,{banners:r??[],name:"right_1"}),banner:t.jsx(ae,{banners:r??[],name:"right_2"}),children:t.jsx("section",{className:da.content,children:n.length>0?t.jsx(un,{className:[da.newsContentSection,"padding-0"].join(" "),paginatorComponent:t.jsx(Et,{texts:h,pathname:i,query:"",currentPage:d,maxPages:e.paginationLimit,showNext:!(n.length<e.newsListLimit)}),children:Array.isArray(n)&&n?.map((y,m)=>t.jsxs(b.Fragment,{children:[u.includes(m+1)&&t.jsx("div",{className:da.itemContent+" banner-context",children:t.jsx(ae,{banners:r??[],name:`block_2_${f[m+1]}`})}),t.jsx(wn,{autorIcon:e.autorIcon,item:y,option:c,paths:e.paths},m)]},m))}):t.jsx("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",gap:"2rem"},children:t.jsx("p",{style:{fontWeight:"var(--fw)",width:"100%",fontSize:"18px",lineHeight:"26px",textAlign:"center"},children:h.autorNotResultMessage})})})})]})});case"op2":return t.jsx(t.Fragment,{children:t.jsxs(Yn,{children:[t.jsx(Zs,{autor:s[0],autorIcon:e.autorIcon}),Array.isArray(n)?t.jsxs(t.Fragment,{children:[t.jsx(na,{content:n,title:"",hasLines:!0,banners:e.banners,bannerPositionIndex:[1,6,12],paths:e.paths,slot_id:"block_2"}),t.jsx(Et,{texts:h,query:"",pathname:i,maxPages:Number(e.paginationLimit),currentPage:Number(o),showNext:!((n.length??0)<Number(e.newsListLimit))})]}):t.jsx("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",gap:"2rem"},children:t.jsx("p",{style:{fontWeight:"var(--fw)",width:"100%",fontSize:"18px",lineHeight:"26px",textAlign:"center"},children:h.autorNotResultMessage})})]})});default:return t.jsx(t.Fragment,{})}},ko={content:"_content_pq89v_1",videoContent:"_videoContent_pq89v_9"},Pt={container:"_container_1xr2t_1",playStyled:"_playStyled_1xr2t_6",imageStyled:"_imageStyled_1xr2t_13",longer:"_longer_1xr2t_26",contentNews:"_contentNews_1xr2t_31",tagContent:"_tagContent_1xr2t_51",tag:"_tag_1xr2t_51",titular:"_titular_1xr2t_68",small:"_small_1xr2t_81",figure:"_figure_1xr2t_87",backDrop:"_backDrop_1xr2t_92",backDropAux:"_backDropAux_1xr2t_100"},Eo=async e=>{const{size:n="longer",video:a}=e,s=a.main.image.sizes[0]?.url??"";return t.jsx("figure",{className:Pt.figure,children:t.jsxs("span",{className:Pt.backdrop,children:[t.jsx("span",{className:Pt.backDropAux}),t.jsx(T,{href:a.info.link.url,target:a.info.link.target,children:t.jsxs("div",{children:[a.main.image.sizes.map(async(o,r)=>o.width>=580?t.jsx("source",{media:"(width >=900px)",srcSet:await ne(o.url)},r):t.jsx("source",{media:"(width <900px)",srcSet:await ne(o.url)},r)),t.jsx("img",{fetchPriority:"low",loading:"lazy",className:[Pt.imageStyled,Pt[n]].join(" "),alt:"",src:s?await ne(s):""})]})})]})})},jc=e=>{const{videos:n}=e;return t.jsx("div",{className:ko.content,children:t.jsx(rt,{children:t.jsx(te,{title:"Videos",isTitle:!0,children:t.jsxs("div",{className:ko.videoContent,children:[t.jsx(Eo,{video:n[0]}),t.jsx("div",{style:{display:"flex",flexDirection:"column"},children:n.slice(1).map((a,s)=>t.jsx(Eo,{size:"small",video:a},`video-small-${s}`))})]})})})})},Re={content:"_content_ruy5q_1",videoContent:"_videoContent_ruy5q_9",articleSection:"_articleSection_ruy5q_21",contentLatout:"_contentLatout_ruy5q_31",title:"_title_ruy5q_36",article:"_article_ruy5q_21",correspondent:"_correspondent_ruy5q_64"},Io={container:"_container_1rq2h_1",playStyled:"_playStyled_1rq2h_9"},Gc=e=>{const{video:n}=e;return t.jsx(T,{href:n.info.link.url?n.info.link.url:void 0,target:n.info.link.target,children:t.jsxs("section",{className:Io.container,children:[t.jsx(ge,{isLarge:!0,preview:{sizes:n.main.image.sizes,description:n.main.description}}),t.jsx(lt,{className:Io.playStyled})]})})},$c=e=>{const n=()=>e?.video.main.author?`${e?.video.main.author} - ${ye(e.video.info.date.created)}`:e?.video.main.author;return t.jsx("div",{className:Re.content,children:t.jsx(rt,{className:Re.contentLatout,children:t.jsx(te,{title:"Videos",isTitle:!0,children:t.jsxs("div",{className:Re.videoContent,children:[t.jsx(Gc,{video:e.video}),t.jsxs("div",{className:Re.articleSection,children:[t.jsx(T,{className:Re.title,href:e.video.info.link.url,target:e.video.info.link.target,children:e.video.main.title}),t.jsx("p",{className:Re.article,children:be(e.video.main.description)}),t.jsx("p",{className:Re.correspondent,children:n()})]})]})})})})},zc=e=>{switch(e.option){case"op1":return t.jsx(jc,{videos:e.data});case"op2":return t.jsx($c,{video:e.data[0]});default:return t.jsx(t.Fragment,{})}};function Hc({containerId:e,containerId2:n}){return b.useEffect(()=>{try{let a=function(){const h=window.twttr;h?.widgets?h.widgets.load(s):c<10?(c++,requestAnimationFrame(a)):console.warn("No se pudo cargar widgets de Twitter")};const s=document.getElementById(e),o=document.getElementById(n);if(!s&&!o)return;const r=s?.querySelectorAll("script[src]")??[],i=o?.querySelectorAll("script[src]")??[];[...r,...i].forEach(h=>{const u=document.createElement("script");Array.from(h.attributes).forEach(f=>{u.setAttribute(f.name,f.value)}),h.replaceWith(u)});const d=document.querySelectorAll('script[src*="platform.twitter.com/widgets.js"]');if(d)for(let h=0;h<d.length;h++)d[h]?.remove();let c=0;if(document.querySelector('script[src*="platform.twitter.com/widgets.js"]'))a();else{const h=document.createElement("script");h.src="https://platform.twitter.com/widgets.js",h.async=!0,h.onload=a,document.body.appendChild(h)}}catch(a){console.warn("Error al procesar embeds de Twitter",a)}},[e]),null}const Vc=e=>{const{isVideo:n=!1,isLarge:a=!1,hasShadow:s=!1,BackDropAuxHeigthMobile:o}=e,r=b.useMemo(()=>e?.preview?.sizes||[],[e?.preview?.sizes]);if(!r.length||!r[0]?.url||r[0]?.url==="")return t.jsx("div",{className:K.imagePlaceholder});const{PUBLIC_API_HOST:i,PUBLIC_ENV:l}=Y();return t.jsx("figure",{className:K.figure,children:t.jsxs("span",{className:K.backdrop,children:[t.jsx("span",{className:K.backdropAux,style:{height:o||"56.25%"}}),t.jsxs("picture",{children:[t.jsx("img",{fetchPriority:"low",loading:"lazy",className:K.imageStyled,alt:e.preview?.description||"",src:(l==="local"?i:"")+r[0]?.url,style:{boxShadow:s?"0px 4px 8px 0px #00000033":"0px"}}),n&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:K.boxPlayIcon,style:{height:a?"40%":"72px"}}),t.jsx(lt,{className:K.playStyled,style:{width:a?"3rem":"27px",height:a?"3rem":"27px",marginBottom:a?"18px":".5rem",marginLeft:a?"30px":".5rem"}})]})]})]})})},Fc=e=>t.jsx("svg",{width:"41",height:"33",viewBox:"0 0 41 33",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t.jsx("path",{d:"M17.9576 21.2985C16.8233 21.2985 15.9277 22.194 15.9277 23.3283C15.9277 24.4627 16.8233 25.3582 17.9576 25.3582C19.0919 25.3582 19.9874 24.4627 19.9874 23.3283C19.9874 22.194 19.0919 21.2985 17.9576 21.2985ZM17.9576 19.2686C19.0919 19.2686 19.9874 18.3731 19.9874 17.2388C19.9874 16.1045 19.0919 15.2089 17.9576 15.2089C16.8233 15.2089 15.9277 16.1045 15.9277 17.2388C15.9277 18.3731 16.8233 19.2686 17.9576 19.2686ZM17.9576 13.1791C19.0919 13.1791 19.9874 12.2836 19.9874 11.1492C19.9874 10.0149 19.0919 9.11938 17.9576 9.11938C16.8233 9.11938 15.9277 10.0149 15.9277 11.1492C15.9277 12.2836 16.8233 13.1791 17.9576 13.1791Z",fill:"#7B888A"})}),Uo={info:{section:{name:"",slug:"",url:""},link:{url:"invalidUrl",target:"",canonical:!1,internal:""},date:{date:"",created:0,modified:0,firstpublish:0,lastpublish:0}},config:{zonehome:void 0,priorityhome:"",zonesection:"",prioritysection:"",homepreview:"",showcomments:!0,showtime:!0,showauthor:!0,showuppertitle:!0,showsubtitle:!0,showads:!0},main:{title:{home:"",section:"",article:""},subtitle:{rendered:"",striped:""},tags:[]},authors:[{firstname:"",lastname:"",fullname:"",image:void 0,name:"",internaluser:!1}],preview:void 0},To=6,Wc=({section:e,currentNews:n,banner:a,isVisible:s=!1,stylesConfig:o})=>{const[r,i]=b.useState({data:Array.from({length:To},()=>Uo)}),[l,d]=b.useState(!1),c=b.useCallback(async()=>{if(!(l||!n?.info?.link?.internal)){d(!0);try{const h=new URLSearchParams({section:e,currentNewsLink:n.info.link.internal}),u=await fetch(`/api/get-more-news?${h}`);if(!u.ok)throw i(void 0),new Error(`HTTP error! status: ${u.status}`);const f=await u.json();i({...f,data:f.data.slice(0,To)})}catch(h){console.error("[/api/get-more-news] Error:",h.message),i(void 0)}}},[e,n.info.link.internal,l]);return b.useEffect(()=>{s&&c()},[s,r,c]),!r?.data||r.data.length===0?null:t.jsx(Yc,{news:r.data,title:"Más Noticias",...o["Modulo 1x3 Client"]??o["Modulo 1x3"],hasLines:!0,showSubtitle:!0,rounded:!0,banner:a,isVisible:s})},Yc=e=>{const{news:n,hasLines:a=!1}=e,s=o=>a&&(o+1)%3!==0?oa.contentSeparator:"";return t.jsx("div",{className:oa.newsContent,style:{gap:a?"30px":"20px","--gridTemplateModlule":a?"repeat(auto-fit, 343px);":"repeat(auto-fit, 380px);"},children:n.map((o,r)=>{const{main:i,authors:l,info:d,preview:c,isVideo:h=!1,config:u,overImage:f="default",isTitle:y=!1,isLarge:m=!1}=o;return t.jsx("div",{className:s(r),style:{order:r},children:t.jsxs("section",{className:It.content,children:[t.jsx(T,{title:i?.title?.section,href:d?.link?.url??"invalidUrl","aria-label":i?.title?.section??"nota",target:d?.link?.target,children:t.jsx(Vc,{isVisible:e.isVisible,preview:c,rounded:e.rounded,isVideo:h,isLarge:m,getImageUrl:e.getImageUrl})}),t.jsx("div",{className:It.newsDescription,children:t.jsx(Kc,{main:i,authors:l,info:d,preview:c,share:e.share,config:u,overImage:f,isTitle:y,paths:o.paths,isVisible:e.isVisible})})]})},r)})})},Kc=e=>{const{share:n=!1,cutSubtitle:a=!0}=e,o=(()=>{if(!e?.authors||e.authors.length===0)return"";const r=e.authors[0],i=ye(e.info?.date?.modified);return r&&e?.config?.showtime&&e.config?.showauthor?`${r.fullname} - ${i}`:r&&e.config?.showauthor?r.fullname:e?.config?.showtime?i:""})();return t.jsxs("div",{className:F.boxInformation,children:[n&&t.jsx(Fc,{className:F.dotStyles}),e?.info?.section?.url&&t.jsxs("div",{className:F.sectionDescriptionContainer,children:[t.jsx(T,{className:F.sectionDescription,href:e.info.section.url??"invalidUrl",children:e.info.section.name}),e?.main?.uppertitle&&t.jsx("p",{className:F.uppertitle,children:e.main.uppertitle})]}),t.jsx("h2",{className:F.articule,children:t.jsx(T,{className:F.linkStyled,style:{"--isLink":e?.info?.link?.url?"underline":"none"},"aria-label":e.main?.title?.section??"nota",href:e?.info?.link?.url,target:e?.info?.link?.target,children:e.main?.title?.section})}),e.config?.showsubtitle&&e.main?.subtitle?.striped&&t.jsx("p",{className:F.description,style:{"--fontSizeSubTitle":e.fontSizeSubTitle,"--lineHeightSubTitle":e.lineHeightSubTitle,"--colorSubTitle":e.colorSubTitle},children:a?be(e.main.subtitle.striped):e.main.subtitle.striped}),(e?.config?.showtime||e.config?.showauthor)&&o&&t.jsx(t.Fragment,{children:e.authors?.[0]?.internaluser?t.jsx(T,{className:F.correspondentLink,href:`/autor/${e.authors[0].name}`,children:o}):t.jsx("div",{className:F.correspondent,children:o})})]})},Jc=({user:e,handleLogout:n,message:a})=>{const s=()=>{const r=document.querySelector(".user-actions-options");r&&r.classList.toggle("show")},o=e.firstname??"Usuario";return t.jsx("div",{className:"comment-item",children:t.jsxs("div",{style:{display:"flex",gap:"14px"},children:[e&&e.picture&&e.picture!==""?t.jsx("img",{className:"comment-avatar-img",src:e.picture,alt:e.username}):t.jsx("div",{className:"comment-avatar",children:o.charAt(0).toUpperCase()}),t.jsxs("div",{style:{flex:1},children:[t.jsxs("div",{className:"comment-header",children:[t.jsxs("span",{className:"comment-username user-welcome",children:["Hola ",o,"!"]}),t.jsx("div",{className:"user-actions-options",children:t.jsx("button",{onClick:()=>{n()},children:"Cerrar Sesion"})}),t.jsx("button",{className:"user-actions-span",onClick:s,children:t.jsx(gn,{width:13,height:13,fill:"black"})})]}),t.jsx("p",{className:"comment-text",children:a})]})]})})},ee={overlay:"_overlay_qj491_3",popup:"_popup_qj491_17",title:"_title_qj491_40",optionsContainer:"_optionsContainer_qj491_52",option:"_option_qj491_52",radioInput:"_radioInput_qj491_66",radioCustom:"_radioCustom_qj491_70",optionLabel:"_optionLabel_qj491_97",buttons:"_buttons_qj491_110",cancelButton:"_cancelButton_qj491_117",closeButton:"_closeButton_qj491_118",buttonAlone:"_buttonAlone_qj491_137",reportButton:"_reportButton_qj491_143",successContainer:"_successContainer_qj491_163",thumbsUp:"_thumbsUp_qj491_171",successMessage:"_successMessage_qj491_177",errorMessage:"_errorMessage_qj491_218",loadingContainer:"_loadingContainer_qj491_231"},xo=async e=>{const{PUBLIC_ENV:n}=Y();if(n==="local")return!0;if(!e)return!1;try{const i=await(await fetch("https://recaptchaenterprise.googleapis.com/v1/projects/undefined/assessments?key=undefined",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event:{token:e,siteKey:void 0}})})).json();return console.log("reCAPTCHA Enterprise verification result:",i),i.tokenProperties?.valid===!0}catch(a){return console.error("Error verificando reCAPTCHA Enterprise:",a),!1}};async function Zc({publication:e,username:n,id:a,type:s,baseUrl:o,captchaToken:r,apiToken:i}){if(!e||!n||!a||!s||!r)throw new Error("Faltan parámetros requeridos: publication, username, id, type, captchaToken");if(typeof e!="string"||typeof n!="string"||typeof a!="string"||typeof s!="string"||typeof r!="string")throw new Error("Todos los parámetros deben ser strings");if(!await xo(r))throw new Error("Token de captcha inválido");if(!i)throw new Error("Falta el token de API del CMS");const l=`${o}/system/modules/com.tfsla.diario.base/templates/hit/5.0/1/newcomments/report`,d=encodeURIComponent(s),c=new URLSearchParams({publication:e,username:n,id:a,type:d}),h=`${l}?${c.toString()}`;try{console.log("Reporting comment:",{publication:e,username:n,id:a,type:s,encodedType:d,url:h});const u=await V.post(h,null,{headers:{"User-Agent":"Bluestack","x-api-token":i,"Content-Type":"application/json"}});if(console.log("Report response:",u.data),u.status===200||u.status===201)return{type:"success",message:"Comentario reportado exitosamente",status:u.status,data:u.data};throw new Error(`Respuesta inesperada del servidor: ${u.status}`)}catch(u){if(console.error("Error reporting comment:",u),V.isAxiosError(u)){const f=u.response?.status,y=u.response?.data;throw f===400?new Error("Datos inválidos para el reporte"):f===401?new Error("Token de API inválido"):f===403?new Error("Acceso denegado para reportar comentario"):f===404?new Error("Comentario no encontrado"):f===409?new Error("El comentario ya fue reportado por este usuario"):f===500?new Error("Error interno del servidor CMS"):new Error(y?.error||y?.message||`Error HTTP ${f}: No se pudo reportar el comentario`)}throw u}}const Ue={spam:"Es spam o contenido comercial no deseado",inappropriate:"Lenguaje inadecuado",hate:"Discurso o símbolos de odio",misinformation:"Información falsa o fraude",terrorism:"Promueve el terrorismo",intellectual:"Violación de propiedad intelectual",bullying:"Bullying o acoso"};function Xc(e){return Ue[e]}const et=300,je={username:"anonimo",firstname:"Usuario",lastname:"Anonimo"};function Rc(e){const n=e.split(" ");if(n.length!==3)return e;const[a,s,o]=n,r=s.charAt(0).toUpperCase()+s.slice(1).toLowerCase();return`${a} ${r} ${o}`}const ha=(e,n)=>{if(!e||!e.current)return{boolean:!1,text:""};const a=e.current?.value||"",s=a.length>et,{PUBLIC_ENV:o}=Y(),r=o==="local",i=a.trim()!==""&&(r||n!=="")&&!s,l=s?`No debes exceder el limite de ${et} caracteres.`:"Debes completar todos los campos para comentar.";return{boolean:i,text:l}},qo=e=>{const n=e.cookie.split("; ").find(a=>a.startsWith("reported="));if(!n)return[];try{return JSON.parse(decodeURIComponent(n.split("=")[1]??""))}catch{return[]}},ed=(e,n)=>{const a=qo(e);a.includes(n)||(a.push(n),e.cookie=`reported=${encodeURIComponent(JSON.stringify(a))}; path=/; max-age=${3600*24*1}`)};function td(e){const[n,a]=e.split("@");if(!n||!a)return e;let s="";n.length<=2?s=n[0]+"*":s=n[0]+"*".repeat(n.length-2)+n[n.length-1];const o=a.lastIndexOf(".");if(o===-1)return`${s}@${a}`;const r=a.slice(0,o),i=a.slice(o);let l="";return r.length<=2?l=r[0]+"*":l=r[0]+"*".repeat(r.length-2)+r[r.length-1],`${s}@${l}${i}`}const _={overlay:"_overlay_tlrod_1",header:"_header_tlrod_18",logo:"_logo_tlrod_25",card:"_card_tlrod_32",close:"_close_tlrod_47",form:"_form_tlrod_71",formUl:"_formUl_tlrod_80",field:"_field_tlrod_92",label:"_label_tlrod_99",input:"_input_tlrod_108",error:"_error_tlrod_126",primary:"_primary_tlrod_132",divider:"_divider_tlrod_167",google:"_google_tlrod_193",googleIcon:"_googleIcon_tlrod_223",spin:"_spin_tlrod_256",checkboxRow:"_checkboxRow_tlrod_278",switch:"_switch_tlrod_307",terms:"_terms_tlrod_315",message:"_message_tlrod_346",passwordChecker:"_passwordChecker_tlrod_351",valid:"_valid_tlrod_370",invalid:"_invalid_tlrod_374",forgotPassword:"_forgotPassword_tlrod_378",successContainer:"_successContainer_tlrod_397",thumbsUp:"_thumbsUp_tlrod_405",successMessage:"_successMessage_tlrod_411"},Ge=()=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",width:"24",height:"24",viewBox:"0 0 32 32",className:_.spin,children:t.jsx("path",{d:"M18,4.181v2.021c4.559,0.929,8,4.97,8,9.798c0,5.514-4.486,10-10,10S6,21.514,6,16c0-4.829,3.441-8.869,8-9.798V4.181 C8.334,5.137,4,10.066,4,16c0,6.617,5.383,12,12,12s12-5.383,12-12C28,10.066,23.666,5.137,18,4.181z"})}),nd=({isOpen:e,onClose:n,commentId:a,publication:s,username:o})=>{const[r,i]=b.useState("form"),[l,d]=b.useState(""),[c,h]=b.useState(""),[u]=b.useState(""),f=[{id:"spam",label:Ue.spam},{id:"inappropriate",label:Ue.inappropriate},{id:"hate",label:Ue.hate},{id:"misinformation",label:Ue.misinformation},{id:"terrorism",label:Ue.terrorism},{id:"intellectual",label:Ue.intellectual},{id:"bullying",label:Ue.bullying}],y=async()=>{if(!(!l||!a)){if(qo(document).includes(a)){h("Ya has reportado este comentario.");return}i("loading"),h("");try{const w=await(await fetch("/api/comments-report",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({publication:s,username:o,id:a,captchaToken:u,type:Ue[l]})})).json();if(w.type==="success")ed(document,a),i("success"),setTimeout(()=>{m()},3e3);else throw new Error(w.message||"Error al reportar comentario")}catch(g){console.error("Error reporting comment:",g),h(g.message||"Error al reportar comentario"),i("form")}}},m=()=>{i("form"),d(""),h(""),n()};return!e||!a||!o?null:t.jsx("div",{className:ee.overlay,children:t.jsxs("div",{className:ee.popup,children:[t.jsx("button",{className:"close-reply-form",onClick:m,children:t.jsx(ct,{})}),t.jsx("h2",{className:ee.title,children:"Reportar Abuso"}),r==="loading"&&t.jsx("div",{className:ee.loadingContainer,children:t.jsx(Ge,{})}),r==="form"||r==="loading"?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:ee.optionsContainer,children:f.map(g=>t.jsxs("label",{className:ee.option,children:[t.jsx("input",{type:"radio",name:"reportReason",value:g.id,checked:l===g.id,onChange:w=>d(w.target.value),className:ee.radioInput}),t.jsx("span",{className:ee.radioCustom}),t.jsx("span",{className:ee.optionLabel,children:g.label})]},g.id))}),c&&t.jsx("div",{className:ee.errorMessage,children:c}),t.jsxs("div",{className:ee.buttons,children:[t.jsx("button",{onClick:m,className:ee.cancelButton,children:"Cancelar"}),t.jsx("button",{onClick:y,disabled:!l,className:ee.reportButton,children:"Reportar"})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:ee.successContainer,children:[t.jsx("div",{className:ee.thumbsUp,children:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:132,height:120,fill:"none",children:t.jsx("path",{fill:"#0073BE",d:"M119.249 42.357H81.915l5.621-27.039.177-1.893a8.906 8.906 0 0 0-2.603-6.272L78.838.941 39.907 39.93c-2.19 2.13-3.491 5.089-3.491 8.343v59.167c0 6.508 5.325 11.833 11.833 11.833h53.25c4.911 0 9.112-2.958 10.887-7.218l17.868-41.713c.533-1.36.829-2.78.829-4.32V54.192c0-6.509-5.325-11.834-11.834-11.834Zm0 23.667-17.75 41.417h-53.25V48.274l25.679-25.678L67.36 54.19h51.889v11.833ZM.916 48.274h23.667v71H.916v-71Z"})})}),t.jsx("p",{className:ee.successMessage,children:"¡Gracias por reportar!"})]}),t.jsx("div",{className:ee.buttons,children:t.jsx("button",{onClick:m,className:[ee.closeButton,ee.buttonAlone].join(" "),children:"Cerrar"})})]})]})})};async function _n({publication:e,path:n,size:a=5,sizereply:s=2,id:o,lastid:r,state:i="5,6",apiToken:l}){if(!e||!n)throw new Error("Missing required parameters: publication and path");if(typeof e!="string"||typeof n!="string")throw new Error("Invalid input types for publication or path");if(!l)throw new Error("Missing CMS API token");const d=parseInt(String(a),10),c=parseInt(String(s),10);if(isNaN(d)||d<=0)throw new Error("Invalid size parameter");if(isNaN(c)||c<0)throw new Error("Invalid sizereply parameter");const h=`${ka()}/hit/5.0/1/newcomments/get`,u=new URLSearchParams({publication:e,path:n,size:d.toString(),sizereply:c.toString(),state:i});o&&u.append("id",o),r&&u.append("lastid",r);const f=`${h}?${u.toString()}`;try{console.log("Fetching comments from:",f);const{data:y}=await V.get(f,{headers:{"x-api-token":l,"Cache-Control":"max-age=0, no-cache, no-store, must-revalidate",Pragma:"no-cache",Expires:"0"}});if(!y)throw new Error("No comments data received");return y.data||y||[]}catch(y){if(console.error("Error fetching comments:",y),V.isAxiosError(y)){const m=y.response?.status,g=y.response?.data;throw m===404?new Error("Comments not found"):m===403?new Error("Access forbidden - check API token"):m===401?new Error("Unauthorized - invalid API token"):m===500?new Error("Internal server error from CMS"):new Error(g?.error||g?.message||`HTTP ${m}: Failed to fetch comments`)}throw y}}const{PUBLIC_PUBLICATION_ID:ad}=Y(),sd=ad,od=e=>{const[n,a]=b.useState(void 0);return b.useEffect(()=>{if(n)return;(async()=>{const{PUBLIC_X_SECURITY_TOKEN:o}=Y();try{const r=await _n({publication:sd,path:e??"",size:5,sizereply:2,id:void 0,lastid:void 0,state:"5,6",apiToken:o});a(r[0]??[])}catch(r){console.error(r),a({comments:[],morecomment:!1})}})()},[n]),{comments:n,setComments:a}},Bo=({username:e,date:n})=>t.jsxs("div",{className:"comment-header",children:[t.jsx("span",{className:"comment-username",children:e}),t.jsx("span",{className:"comment-header-dot",children:"•"}),t.jsx("span",{className:"comment-date",children:Rc(ye(Number(n)))})]}),Lo=({user:e})=>t.jsx("div",{className:"comment-avatar",children:e.picture?t.jsx("img",{className:"comment-avatar-img",src:e.picture,alt:e.username}):e.firstname.charAt(0).toUpperCase()}),Do=({isReply:e=!1,onReply:n,onFlag:a})=>t.jsxs("div",{className:"comment-actions",children:[!e&&n&&t.jsx("button",{onClick:n,className:"comment-action-btn",children:t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",children:[t.jsx("g",{clipPath:"url(#a)",children:t.jsx("path",{fill:"#4D4E4E",d:"M9.976 9V5l-6.983 7 6.983 7v-4.1c4.988 0 8.48 1.6 10.973 5.1-.997-5-3.99-10-10.973-11Z"})}),t.jsx("defs",{children:t.jsx("clipPath",{id:"a",children:t.jsx("path",{fill:"#fff",d:"M0 0h23.942v24H0z"})})})]})}),t.jsx("button",{onClick:a,className:"comment-action-btn",children:t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:25,height:24,fill:"none",children:[t.jsx("g",{clipPath:"url(#a)",children:t.jsx("path",{fill:"#4D4E4E",d:"M20.133 2h-16c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2Zm0 14H5.303l-1.17 1.17V4h16v12Zm-9-11h2v6h-2V5Zm0 8h2v2h-2v-2Z"})}),t.jsx("defs",{children:t.jsx("clipPath",{id:"a",children:t.jsx("path",{fill:"#fff",d:"M.133 0h24v24h-24z"})})})]})})]}),Mo=({commentRef:e,captchaToken:n="",setIsDisabled:a})=>(b.useEffect(()=>{const s=e.current;if(!s)return;const o=()=>{const i=s.value.length;s.parentElement&&(s.parentElement.dataset.text=`${i}/${et}`),s.classList.toggle("over-limit",i>et),a(!ha(e,n).boolean)};return s.addEventListener("input",o),o(),()=>s.removeEventListener("input",o)},[e,n,a]),t.jsxs("div",{children:[t.jsx("label",{className:"comment-input-label",children:"Comentario"}),t.jsx("textarea",{ref:e,name:"comment",placeholder:"Ingresa un comentario",rows:2})]})),Po=({commentRef:e,captchaToken:n="",children:a})=>{const s=ha(e,n);return t.jsx("div",{className:"form-actions",children:t.jsxs("div",{className:"submit-zone",children:[a,!s.boolean&&t.jsx("p",{className:"submit-warning",children:s.text})]})})},Oo=({onClick:e,isDisabled:n})=>{const[a,s]=b.useState(!1);return b.useEffect(()=>{let o=null;return a&&(o=setTimeout(()=>{s(!1)},2400)),()=>{o&&clearTimeout(o)}},[a]),a?t.jsx("div",{className:"success-gif-container",children:t.jsx("img",{className:"success-gif",src:"/Success.gif"})}):t.jsxs("button",{type:"button",onClick:async o=>{await e(o)&&s(!0)},id:"comment-button",className:`submit-btn ${n?"disabled":"active"}`,children:["Enviar Comentario",t.jsx("svg",{style:{minWidth:16},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M1.39258 8.99997H12.5626L7.68258 13.88C7.29258 14.27 7.29258 14.91 7.68258 15.3C8.07258 15.69 8.70258 15.69 9.09258 15.3L15.6826 8.70997C16.0726 8.31997 16.0726 7.68997 15.6826 7.29997L9.10258 0.699971C8.71258 0.309971 8.08258 0.309971 7.69258 0.699971C7.30258 1.08997 7.30258 1.71997 7.69258 2.10997L12.5626 6.99997H1.39258C0.842578 6.99997 0.392578 7.44997 0.392578 7.99997C0.392578 8.54997 0.842578 8.99997 1.39258 8.99997Z",fill:"currentColor"})})]})},{PUBLIC_PUBLICATION_ID:rd}=Y(),id=rd,Qo=async({path:e,ref:n,captchaToken:a,button:s,user:o,id:r,addComment:i})=>{const l=n.current?.value||"";if(!ha(n,a).boolean||!o){const d=s.nextElementSibling;return d&&(d.style.display="block"),!1}try{const d=Date.now(),c=await fetch("/api/comments-add",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({publication:id,path:e,id:r,username:o.username,comment:l,recaptchaResponse:a})});let h=null;try{h=await c.json()}catch(m){console.error("Error parsing JSON response:",m)}if(!c.ok)throw new Error(`Error al enviar comentario: ${h?.message} status: ${c.status}`);const u=Date.now(),f=Math.max(0,2400+Math.abs(u-d)),y={username:o.username,firstname:o.firstname,...o.lastname&&{lastname:o.lastname},...o.picture&&{picture:o.picture}};return i({id:u.toString(),text:l,user:y,date:{time:Date.now()},reply:[]}),n.current&&(n.current.value=""),f}catch(d){return console.error("Error enviando comentario:",d),alert(d.message||"Error al enviar el comentario."),!1}},ld=({replyingTo:e,commentRef:n,user:a,path:s,addReply:o,closeForm:r})=>{const[i,l]=b.useState(!0),[d,c]=b.useState(""),h=()=>{n.current?.parentElement&&(n.current.parentElement.dataset.text=`0/${et}`),l(!0),r()};return t.jsxs("div",{className:"comment-form reply-form",children:[t.jsx("button",{className:"close-reply-form",onClick:h,children:t.jsx(ct,{})}),t.jsx(Mo,{commentRef:n,captchaToken:d,setIsDisabled:l}),t.jsx(Po,{commentRef:n,captchaToken:d,setCaptchaToken:c,children:t.jsx(Oo,{onClick:async u=>{if(i)return;const f=await Qo({path:s,ref:n,captchaToken:d,button:u.currentTarget,user:a,id:e,addComment:o});return f&&typeof f=="number"?(setTimeout(()=>{h()},f),!0):!1},isDisabled:i})})]})},cd=({reply:e,replyingTo:n,user:a,onFlag:s})=>{const o=e.text;let r=`${je.firstname} ${je.lastname}`,i=je.username;return e.user&&(r=`${e.user.firstname} ${e.user.lastname}`,i=e.user.username),t.jsx("div",{className:"comment-item reply",children:t.jsxs("div",{className:"comment-header-container",children:[t.jsx(Lo,{user:e.user?e.user:je}),t.jsxs("div",{style:{flex:1},children:[t.jsx(Bo,{username:r,date:e.date.time}),t.jsxs("div",{className:"comment-reply-to",children:["Respondiendo a ",t.jsx("strong",{children:n})]}),t.jsx("p",{className:"comment-text",children:o}),a?.username.toLowerCase()!==i.toLowerCase()&&t.jsx(Do,{isReply:!0,onFlag:()=>s(e.id)})]})]})})},dd=({comment:e,replyingTo:n,path:a,user:s,handleReplyingTo:o,onFlag:r})=>{const i={morereply:e.morereply??!1,reply:e.reply?e.reply:[]},[l,d]=b.useState(i),[c,h]=b.useState(!1),u=process.env.NEXT_PUBLIC_PUBLICATION_ID??"",f=e.text,y=b.useRef(null);let m=`${je.firstname} ${je.lastname}`,g=je.username;e.user&&(m=`${e.user.firstname} ${e.user.lastname}`,g=e.user.username);const w=v=>{d({morereply:l.morereply,reply:[v,...l.reply]})};return t.jsx("div",{className:"comment-item",children:t.jsxs("div",{className:"comment-header-container","data-hasreplies":l.reply.length>0?"true":"false",children:[t.jsx(Lo,{user:e.user?e.user:je}),t.jsxs("div",{style:{flex:1},children:[t.jsx(Bo,{username:m,date:e.date.time}),t.jsx("p",{className:"comment-text",children:f}),s?.username.toLowerCase()!==g.toLowerCase()&&t.jsx(Do,{onReply:()=>o(e.id),onFlag:()=>r(e.id)}),n===e.id&&s&&t.jsx(ld,{replyingTo:n,commentRef:y,addReply:w,user:s,path:a,closeForm:()=>o("")}),l.reply.length>0&&t.jsxs("div",{className:"comment-replies",children:[l.reply.map(v=>t.jsx(cd,{user:s,reply:v,replyingTo:m,onFlag:r},v.id)),c?t.jsx("div",{style:{marginLeft:"4rem",position:"relative"},children:t.jsx(Ge,{})}):l.morereply&&t.jsx("button",{className:"comment-replies-button reply-button",onClick:async()=>{const v=l.reply[l.reply.length-1]?.id;h(!0);try{const k=(await _n({publication:u,path:a??"",size:2,sizereply:2,id:e.id,lastid:v,state:"5,6",apiToken:process.env.NEXT_PUBLIC_X_SECURITY_TOKEN}))[0];h(!1),d({morereply:k.morecomment,reply:[...l.reply,...k.comments]})}catch(I){throw h(!1),new Error(`Error al obtener comentarios: ${I}`)}},children:"Más Respuestas"})]})]})]})})},hd=({commentRef:e,user:n,path:a,addComment:s})=>{const[o,r]=b.useState(!0),[i,l]=b.useState("");return t.jsxs("div",{className:"comment-form",children:[t.jsx(Mo,{commentRef:e,captchaToken:i,setIsDisabled:r}),t.jsx(Po,{commentRef:e,captchaToken:i,setCaptchaToken:l,children:t.jsx(Oo,{onClick:async d=>{if(o)return;const c=await Qo({path:a,ref:e,captchaToken:i,button:d.currentTarget,user:n,addComment:s});return c&&typeof c=="number"?(e.current?.parentElement&&(e.current.parentElement.dataset.text=`0/${et}`),r(!0),setTimeout(()=>{e.current?.parentElement&&(e.current.parentElement.dataset.text=`0/${et}`),r(!0)},c),!0):!1},isDisabled:o})})]})},{PUBLIC_PUBLICATION_ID:ud,PUBLIC_X_SECURITY_TOKEN:md}=Y(),jo=ud??"",fd=({isAuthenticated:e,path:n,user:a,handleLogout:s})=>{const o=n.replaceAll("/","|"),[r,i]=b.useState(void 0),[l,d]=b.useState(""),{comments:c,setComments:h}=od(o),[u,f]=b.useState(!1),y=b.useRef(null),m=S=>{d(l===S?"":S)},g=S=>{h(c?{...c,comments:[S,...c.comments??[]]}:void 0)},w=S=>{i(S)},v=async()=>{if(!c||!c.morecomment||c.comments.length===0)return;const S=c.comments[c.comments.length-1];if(!S)return;f(!0);const O=S.id;try{const $=(await _n({publication:jo,path:o??"",size:5,sizereply:2,id:void 0,lastid:O,state:"5,6",apiToken:md}))[0];h({morecomment:$.morecomment??!1,comments:[...c.comments,...$.comments]}),f(!1)}catch(M){throw f(!1),new Error(`Error al obtener comentarios: ${M}`)}},I=c?.comments&&c.comments.length>0,k=I?"Comparte tu opinión de este artículo.":"Se el primero en compartir tu opinión de este artículo.",D=t.jsx("div",{style:{display:"flex",width:"100%",justifyContent:"center"},children:t.jsx(Ge,{})});return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"comments-container",children:t.jsx(te,{title:I||e?"COMENTARIOS":!1,children:t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"comments-header",children:e&&a&&t.jsxs(t.Fragment,{children:[t.jsx(Jc,{user:a,handleLogout:s,message:k}),t.jsx(hd,{commentRef:y,user:a,addComment:g,path:o})]})}),t.jsx("div",{className:"comments-list","data-isauthenticated":`${e}`,children:c?c.comments&&c.comments.length>0?t.jsxs(t.Fragment,{children:[c.comments.map(S=>t.jsx(dd,{comment:S,replyingTo:l,handleReplyingTo:m,onFlag:w,user:a??je,path:o},S.id)),u&&D]}):null:D}),c?.morecomment&&!u&&t.jsx("button",{className:"comment-replies-button",onClick:v,children:"Más"})]})})}),t.jsx(nd,{username:a?.username??void 0,publication:jo,commentId:r,isOpen:r!==void 0,onClose:()=>i(void 0)})]})},ua=async(e,n)=>{if(!e)throw new Error("No action provided");if(!n)throw new Error("No site key provided");const a=window.grecaptcha;if(!a?.enterprise)throw new Error("grecaptcha not loaded");return new Promise((s,o)=>{a.enterprise.ready(async()=>{try{const r=await a.enterprise.execute(n,{action:e});if(!r)throw new Error("Captcha token no generado");s(r)}catch(r){o(r)}})})},Go={email:{label:"Email",required:!0},given_name:{label:"Nombre",required:!0},family_name:{label:"Apellido",required:!0},password:{label:"Contraseña",required:!0},confirmPassword:{label:"Confirmar contraseña",required:!0}},Nn=[{label:"La contraseña debe tener al menos 8 caracteres",test:e=>e.length>=8},{label:"Usa un número",test:e=>/\d/.test(e)},{label:"Usa una letra minúscula",test:e=>/[a-z]/.test(e)},{label:"Usa una letra mayúscula",test:e=>/[A-Z]/.test(e)},{label:"Usa un símbolo",test:e=>/[^A-Za-z0-9]/.test(e)}];function gd({goToLogin:e,handleGoogleLogin:n}){const[a,s]=b.useState({}),[o,r]=b.useState(!1),[i,l]=b.useState(!1),[d,c]=b.useState(null),[h,u]=b.useState("register"),f=(w,v)=>{s(I=>({...I,[w]:v}))},y=async w=>{w.preventDefault(),c(null),l(!0);try{const v=Object.keys(Go).filter(M=>!["username","password","confirmPassword"].includes(M)).map(M=>({Name:M,Value:a[M]}));if(v.some(M=>{if(!M.Value||M.Value.trim()==="")return!0}))return l(!1),c("Complete todos los campos");if(a.password!==a.confirmPassword){c("Las contraseñas no coinciden");return}const I=a.password||"";if(Nn.some(M=>!M.test(I))){c("La contraseña no es válida");return}const D=Math.floor(Date.now()/1e3);v.push({Name:"updated_at",Value:String(D)});const S=await ua("comment_register","");if(!S)throw new Error("Captcha token no generado");const O=await fetch("/api/auth/create-user",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:a.email,password:a.password,userAttributes:v,token:S})});if(!O.ok){const M=await O.json().catch(()=>({}));if(M.code==="UsernameExistsException"){await fetch("/api/auth/resend-code",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:a.email})}),u("confirm");return}throw new Error(M?.error||"Error al crear usuario")}u("confirm")}catch(v){console.log(v),c(v?.message||v?.error||"Error inesperado")}finally{l(!1)}},m=async w=>{if(w.preventDefault(),!a.confirmationCode){c("Debes ingresar el código de verificación");return}c(null),l(!0);try{const v=await fetch("/api/auth/confirm-user",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:a.email,code:a.confirmationCode})});if(!v.ok){const I=await v.json().catch(()=>({}));throw new Error(I?.error||"Error al confirmar usuario")}u("success")}catch(v){c(v?.message||"Error inesperado")}finally{l(!1)}},g=a.password||"";return t.jsxs(t.Fragment,{children:[h==="register"&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:n,className:_.google,children:[t.jsx("img",{src:"https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/google.svg",alt:"",className:_.googleIcon}),t.jsx("span",{children:"Continuar con Google"})]}),t.jsx("div",{className:_.divider,children:t.jsx("span",{children:"o"})}),t.jsxs("form",{onSubmit:y,className:_.form,"data-error":d?"true":"false",children:[t.jsx("ul",{className:_.formUl,children:Object.entries(Go).map(([w,{label:v}])=>t.jsxs("div",{className:_.field,children:[t.jsx("label",{className:_.label,children:v}),t.jsx("input",{type:w.toLowerCase().includes("password")?o?"text":"password":w==="birthdate"?"date":w==="email"?"email":w==="phone_number"?"tel":"text",name:w,value:a[w]||"",onChange:I=>f(w,I.target.value),className:_.input,placeholder:""}),w==="password"&&t.jsx("div",{className:_.passwordChecker,children:Nn.map((I,k)=>{const D=I.test(g);return t.jsxs("div",{className:D?_.valid:_.invalid,children:[t.jsx("div",{children:D?"✔":"○"}),t.jsx("div",{children:I.label})]},k)})}),w==="confirmPassword"&&t.jsxs("div",{className:_.checkboxRow,children:[t.jsx("input",{id:"showPasswordRegister",type:"checkbox",checked:o,onChange:I=>r(I.target.checked)}),t.jsx("label",{htmlFor:"showPasswordRegister",className:_.checkboxLabel,children:"Mostrar contraseñas"})]})]},w))}),d&&t.jsx("p",{className:_.error,children:d}),t.jsxs("p",{className:_.terms,children:["Al continuar, confirmo que he leído y aceptado los",t.jsx("a",{href:"/pages/politicas-de-privacidad.html",target:"_blank",children:"Términos y Condiciones"}),"de nuestra comunidad"]}),t.jsx("button",{type:"submit",className:_.primary,disabled:i,children:i?t.jsx(Ge,{}):"Crear cuenta"})]})]}),h==="confirm"&&t.jsxs("form",{onSubmit:m,className:_.form,"data-error":d?"true":"false",children:[t.jsxs("div",{className:_.field,children:[t.jsx("label",{className:_.label,children:"Código de verificación"}),t.jsx("input",{type:"text",name:"confirmationCode",value:a.confirmationCode||"",onChange:w=>f("confirmationCode",w.target.value),className:_.input,required:!0})]}),d&&t.jsx("p",{className:_.error,children:d}),t.jsx("button",{type:"submit",className:_.primary,disabled:i,children:i?t.jsx(Ge,{}):"Confirmar cuenta"}),t.jsxs("p",{className:_.switch,children:["¿Ya confirmaste antes?",t.jsx("button",{type:"button",onClick:e,children:"Iniciar sesión"})]})]}),h==="success"&&t.jsxs("form",{className:_.form,children:[t.jsxs("div",{className:_.successContainer,children:[t.jsx("div",{className:_.thumbsUp,children:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:132,height:120,fill:"none",children:t.jsx("path",{fill:"#0073BE",d:"M119.249 42.357H81.915l5.621-27.039.177-1.893a8.906 8.906 0 0 0-2.603-6.272L78.838.941 39.907 39.93c-2.19 2.13-3.491 5.089-3.491 8.343v59.167c0 6.508 5.325 11.833 11.833 11.833h53.25c4.911 0 9.112-2.958 10.887-7.218l17.868-41.713c.533-1.36.829-2.78.829-4.32V54.192c0-6.509-5.325-11.834-11.834-11.834Zm0 23.667-17.75 41.417h-53.25V48.274l25.679-25.678L67.36 54.19h51.889v11.833ZM.916 48.274h23.667v71H.916v-71Z"})})}),t.jsxs("div",{className:_.successMessage,children:[t.jsx("p",{children:"Confirmación completa."}),t.jsx("p",{children:"Ya eres parte de la comunidad!"})]})]}),t.jsx("button",{onClick:e,className:_.primary,children:"Iniciar sesión"})]}),h==="register"&&t.jsxs("p",{className:_.switch,children:["¿Ya tenés cuenta?",t.jsx("button",{type:"button",onClick:e,children:"Iniciar sesión"})]})]})}function pd({onClose:e,checkAuth:n,goToRegister:a,handleGoogleLogin:s}){const[o,r]=b.useState("login"),[i,l]=b.useState(""),[d,c]=b.useState(""),[h,u]=b.useState(""),[f,y]=b.useState(""),[m,g]=b.useState(""),[w,v]=b.useState(!1),[I,k]=b.useState(!1),[D,S]=b.useState(null),O=async z=>{if(!I){z.preventDefault(),S(null),k(!0);try{const P=await ua("comment_login",void 0);if(!P)throw new Error("Captcha token no generado");const x=await fetch("/api/auth/login-password",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({email:i,password:d,token:P})});if(!x.ok){const Z=await x.json().catch(()=>({}));throw new Error(Z?.error||"Ha ocurrido un error")}e(),await n()}catch(P){S(P?.message||"Error inesperado")}finally{k(!1)}}},M=async z=>{if(!I){z.preventDefault(),S(null),k(!0);try{const P=await fetch("/api/auth/forgot-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:i})});if(!P.ok){const x=await P.json().catch(()=>({}));throw new Error(x?.error||"Error al enviar código")}c(""),r("changePassword")}catch(P){S(P?.message||"Error inesperado")}finally{k(!1)}}},$=async z=>{if(I)return;if(z.preventDefault(),f!==m){S("Las contraseñas no coinciden");return}if(Nn.some(x=>!x.test(f))){S("La contraseña no cumple con los requisitos");return}S(null),k(!0);try{const x=await fetch("/api/auth/confirm-forgot-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:i,code:h,newPassword:f})});if(!x.ok){const Z=await x.json().catch(()=>({}));throw new Error(Z?.error||"Error al cambiar contraseña")}r("feedback")}catch(x){S(x?.message||"Error inesperado")}finally{k(!1)}};return t.jsxs(t.Fragment,{children:[o==="login"&&t.jsx(Ad,{email:i,password:d,showPassword:w,loading:I,error:D,setEmail:l,setPassword:c,setShowPassword:v,onSubmit:O,onForgot:()=>{S(null),r("forgot")},onRegister:a,handleGoogleLogin:s}),o==="forgot"&&t.jsx(wd,{email:i,setEmail:l,loading:I,error:D,onSubmit:M,onBack:()=>{S(null),r("login")}}),o==="changePassword"&&t.jsx(yd,{email:i,confirmationCode:h,newPassword:f,confirmNewPassword:m,showPassword:w,loading:I,error:D,setConfirmationCode:u,setNewPassword:y,setConfirmNewPassword:g,setShowPassword:v,onSubmit:$,onBack:()=>{S(null),r("forgot")}}),o==="feedback"&&t.jsx(bd,{onBackToLogin:()=>{S(null),r("login")}})]})}function Ad({email:e,password:n,showPassword:a,loading:s,error:o,setEmail:r,setPassword:i,setShowPassword:l,onSubmit:d,onForgot:c,onRegister:h,handleGoogleLogin:u}){return t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:u,className:_.google,children:[t.jsx("img",{src:"https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/google.svg",alt:"",className:_.googleIcon}),t.jsx("span",{children:"Continuar con Google"})]}),t.jsx("div",{className:_.divider,children:t.jsx("span",{children:"o"})}),t.jsxs("form",{onSubmit:d,className:_.form,"data-error":o?"true":"false",children:[t.jsxs("div",{className:_.field,children:[t.jsx("label",{className:_.label,children:"Email"}),t.jsx("input",{type:"email",value:e,onChange:f=>r(f.target.value),className:_.input,placeholder:""})]}),t.jsxs("div",{className:_.field,children:[t.jsx("label",{className:_.label,children:"Contraseña"}),t.jsx("input",{type:a?"text":"password",value:n,onChange:f=>i(f.target.value),className:_.input,placeholder:""}),t.jsxs("div",{className:_.checkboxRow,children:[t.jsx("input",{id:"showPasswordLogin",type:"checkbox",checked:a,onChange:f=>l(f.target.checked)}),t.jsx("label",{htmlFor:"showPasswordLogin",className:_.checkboxLabel,children:"Mostrar contraseña"})]})]}),o&&t.jsx("p",{className:_.error,children:o}),t.jsx("button",{type:"submit",className:_.primary,disabled:s,children:s?t.jsx(Ge,{}):"Iniciar Sesión"})]}),t.jsxs("p",{className:_.switch,children:["¿No tenés cuenta?",t.jsx("button",{type:"button",onClick:h,children:"Registrate"})]}),t.jsx("button",{type:"button",className:_.forgotPassword,onClick:c,children:"Olvidé mi contraseña"})]})}function wd({email:e,setEmail:n,loading:a,error:s,onSubmit:o,onBack:r}){return t.jsxs("form",{onSubmit:o,className:_.form,"data-error":s?"true":"false",children:[t.jsx("p",{className:_.message,children:"Ingrese su dirección de correo electrónico. Le enviaremos un mensaje con un código para restablecer la contraseña."}),t.jsxs("div",{className:_.field,children:[t.jsx("label",{className:_.label,children:"Email"}),t.jsx("input",{type:"email",value:e,name:"email",onChange:i=>n(i.target.value),className:_.input,placeholder:""})]}),s&&t.jsx("p",{className:_.error,children:s}),t.jsx("button",{type:"submit",className:_.primary,disabled:a,children:a?t.jsx(Ge,{}):"Enviar código"}),t.jsx("p",{className:_.switch,children:t.jsx("button",{type:"button",onClick:r,children:"Volver"})})]})}function yd({email:e,confirmationCode:n,newPassword:a,confirmNewPassword:s,showPassword:o,loading:r,error:i,setConfirmationCode:l,setNewPassword:d,setConfirmNewPassword:c,setShowPassword:h,onSubmit:u,onBack:f}){return t.jsxs("form",{onSubmit:u,className:_.form,"data-error":i?"true":"false",children:[t.jsxs("p",{className:_.message,children:["Hemos enviado un código de restablecimiento de contraseña en un mensaje de Correo electrónico a ",td(e),". Ingrese el código y la contraseña nueva."]}),t.jsxs("ul",{className:_.formUl,children:[t.jsxs("div",{className:_.field,children:[t.jsx("label",{className:_.label,children:"Código de verificación"}),t.jsx("input",{type:"text",value:n,onChange:y=>l(y.target.value),className:_.input,placeholder:""})]}),t.jsxs("div",{className:_.field,children:[t.jsx("label",{className:_.label,children:"Nueva contraseña"}),t.jsx("input",{type:o?"text":"password",value:a,onChange:y=>d(y.target.value),className:_.input,placeholder:"",name:"password"}),t.jsx("div",{className:_.passwordChecker,children:Nn.map((y,m)=>{const g=y.test(a);return t.jsxs("div",{className:g?_.valid:_.invalid,children:[t.jsx("div",{children:g?"✔":"○"}),t.jsx("div",{children:y.label})]},m)})})]}),t.jsxs("div",{className:_.field,children:[t.jsx("label",{className:_.label,children:"Confirmar contraseña"}),t.jsx("input",{type:o?"text":"password",value:s,onChange:y=>c(y.target.value),className:_.input,placeholder:""}),t.jsxs("div",{className:_.checkboxRow,children:[t.jsx("input",{id:"showPasswordForgot",type:"checkbox",checked:o,onChange:y=>h(y.target.checked)}),t.jsx("label",{htmlFor:"showPasswordForgot",className:_.checkboxLabel,children:"Mostrar contraseñas"})]})]})]}),i&&t.jsx("p",{className:_.error,children:i}),t.jsx("button",{type:"submit",className:_.primary,style:{maxWidth:r?"revert-layer":"fit-content"},disabled:r,children:r?t.jsx(Ge,{}):"Cambiar contraseña"}),t.jsx("p",{className:_.switch,children:t.jsx("button",{type:"button",onClick:f,children:"Volver"})})]})}function bd({onBackToLogin:e}){return t.jsxs("div",{className:_.form,children:[t.jsx("p",{className:_.success,children:"La contraseña fue cambiada con éxito"}),t.jsx("button",{type:"button",className:_.primary,onClick:e,children:"Iniciar Sesión"})]})}function Cd({loginUrl:e,onClose:n,checkAuth:a,icon:s}){const[o,r]=b.useState("login"),i=async()=>{if(!e)return;const l=encodeURIComponent(window.location.pathname);window.location.href=`/api/auth/login?redirect=${l}`};return t.jsx("div",{className:_.overlay,role:"dialog","aria-modal":"true",id:"pop-overlay",onClick:l=>{const d=l.target;d&&d.id==="pop-overlay"&&n()},children:t.jsxs("div",{className:_.card,children:[t.jsxs("header",{className:_.header,children:[t.jsx("div",{className:_.logo,children:s?s():null}),t.jsx("button",{onClick:n,className:_.close,"aria-label":"Cerrar",children:t.jsx(ct,{})})]}),o==="login"&&t.jsx(pd,{onClose:n,checkAuth:a,handleGoogleLogin:i,goToRegister:()=>r("register")}),o==="register"&&t.jsx(gd,{handleGoogleLogin:i,goToLogin:()=>r("login")})]})})}function vd({isAuthenticated:e,setIsAuthenticated:n,loginUrl:a,user:s,path:o,checkAuth:r,icon:i}){const[l,d]=b.useState(!1),c=async()=>{{const u=window.location.pathname;window.location.href=`${window.location.origin}/api/auth/logout?redirect=${encodeURIComponent(u)}`}},h=async u=>{u.preventDefault(),a&&d(!0)};return t.jsxs(t.Fragment,{children:[l&&t.jsx(Cd,{loginUrl:a,icon:i,checkAuth:r,onClose:()=>{d(!1)}}),!e&&t.jsxs("div",{className:"auth-container",children:[t.jsx("p",{children:"Sumate a la comunidad para dejar tu comentario"}),t.jsx("a",{href:a,onClick:h,className:"login-button",children:"Iniciar Sesión"})]}),t.jsx(fd,{isAuthenticated:e,handleLogout:c,path:o,user:e?s:void 0})]})}function _d({isVisible:e,path:n,icon:a}){const[s,o]=b.useState(null),[r,i]=b.useState(null),l=async()=>{if(e){if(document.cookie.search("undefinedIS_AUTH=true")===-1){o(!1),i(null),console.log("user not logged");return}try{const u=await(await fetch("/api/auth/user",{credentials:"include"})).json();o(u.isAuthenticated??!1),i(u.user??null)}catch(h){console.error("Error checking auth:",h),o(!1),i(null)}}};b.useEffect(()=>{l()},[e]),b.useEffect(()=>{if(!r||!e||typeof window>"u")return;const h=window;if(typeof h!="function"){console.warn("gtag no está disponible todavía");return}h.gtag("set",{user_id:r.username}),console.log("username setted successfully")},[r,e]);const d="/api/auth/login",c=t.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:310,position:"relative"},children:t.jsx(Ge,{})});return s===null?c:e?t.jsx(vd,{icon:a,isAuthenticated:s,setIsAuthenticated:o,loginUrl:d,user:r??void 0,checkAuth:l,path:n}):c}const Nd=({render:e,internalPath:n,section:a,currentNews:s,stylesConfig:o,icon:r})=>{const i=b.useRef(null),[l,d]=b.useState(!0);b.useEffect(()=>{const h=new IntersectionObserver(([u])=>{u?.isIntersecting&&(d(!0),h.disconnect())},{rootMargin:"0px",threshold:.1});return i.current&&h.observe(i.current),()=>h.disconnect()},[]);const c={comment:t.jsx(_d,{path:n,icon:r,isVisible:l}),more:t.jsx(Wc,{section:a,currentNews:s,stylesConfig:o,isVisible:l})};return t.jsx("div",{ref:i,suppressHydrationWarning:!0,style:{...o?o["Modulo 1x3 Client"]?o["Modulo 1x3 Client"]:o["Modulo 1x3"]:{}},children:c[e]})};async function Sd({publication:e,path:n,username:a,comment:s,id:o,recaptchaResponse:r,baseUrl:i,apiToken:l,securityToken:d}){if(console.log("Adding comment with data:",{publication:e,path:n,username:a,comment:s,id:o,recaptchaResponse:r}),!e||!n||!s||!a)return{type:"error",message:"Faltan campos obligatorios. Por favor, completa todos los campos.",status:400};if([e,n,s,a].some(y=>typeof y!="string"))return{type:"error",message:"Datos inválidos. Intenta de nuevo.",status:400};if(!a.trim())return{type:"error",message:"El nombre no puede estar vacío.",status:400};if(!s.trim())return{type:"error",message:"El comentario no puede estar vacío.",status:400};const c=await xo(r);if(console.log("Verifying captcha token...",c),!c)return{type:"error",message:"Captcha inválido. Intenta nuevamente.",status:403};const h=`${i}/system/modules/com.tfsla.diario.base/templates/hit/5.0/1/newcomments/add`,u={publication:e,path:n.replace(/\|/gi,"/"),username:a??!1,text:s.trim()};o&&(u.id=o);const f=new URLSearchParams(u);try{const{data:y}=await V.get(`${h}?${f.toString()}`,{headers:{"Content-Type":"application/json","x-security-token":d,"x-api-token":l,"User-Agent":"amplifyapp-comments-saas"}});return!y||y.error?(console.error("CMS error response:",y),{type:"error",message:"No se pudo guardar el comentario. Intenta nuevamente en unos minutos.",status:502}):(console.log("Comentario enviado con éxito",y),{type:"success",message:"Comentario enviado con éxito.",status:200})}catch(y){if(console.error("Error enviando comentario:",y),V.isAxiosError(y)){const m=y.response?.status??500,g=y.response?.data;return m===400?{type:"error",message:g?.message||"Solicitud inválida. Verifica que los campos sean correctos.",status:400}:m===403?{type:"error",message:"Captcha inválido o acceso prohibido.",status:403}:m===500?{type:"error",message:"Error interno del servidor del CMS.",status:500}:{type:"error",message:g?.message||"No se pudo enviar el comentario.",status:m}}return{type:"error",message:"Error inesperado. Intenta nuevamente.",status:500}}}const kd=async({token:e,projectId:n,captchaKey:a,apiKey:s,captchaAction:o})=>{if(!e)throw new Error("No token provided");if(!n||!a||!s)throw new Error("Missing project ID or site key");if(!o)throw new Error("No action provided");try{const i=await(await fetch(`https://recaptchaenterprise.googleapis.com/v1/projects/${n}/assessments?key=${s}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event:{token:e,siteKey:a,expectedAction:o}})})).json();if(!i?.tokenProperties?.valid)throw new Error(`The token was: ${i?.tokenProperties?.invalidReason}`);if(i.tokenProperties.action!==o)throw new Error("The action attribute in your reCAPTCHA tag does not match the action you are expecting to score");return i?.riskAnalysis?.score??0}catch(r){throw console.error("Recaptcha verification failed",r),new Error(String(r))}};p.AssetsPreconnect=qa,p.AutorComponent=Qc,p.AutorHeader1=Js,p.AutorHeader2=Zs,p.BannerAdvertising=ae,p.BannerAdvertisingMiddle=Te,p.CarrouselCSR=Zi,p.CarrouselIRS=Ze,p.CarruselCard=Ao,p.CarruselOpinion=wo,p.CommonServices=fe,p.Comscore=ma,p.ContactInfoServer=Wl,p.ContactInput=kl,p.ContactSelect=El,p.ContactTextarea=Il,p.ContentLayout1=rt,p.ContentLayoutTema=Yn,p.DEBUG_MainSlots=xc,p.DestacadoNoticias=io,p.DestacadoVideos=fo,p.DynamicBlockServices=xs,p.DynamicComponents=Tc,p.DynamicMainSlot=Cn,p.DynamicSlot=ca,p.EditorialBlock=Gl,p.ErrorComponent=Sl,p.Font=za,p.Footer=Al,p.FormatAfterScripts=xa,p.FormatScripts=Un,p.GA4=fa,p.GTM=ga,p.GalleryHeader=ia,p.GenerateBody=Fi,p.GenerateHead=Vi,p.Header=Ml,p.ImageOffline=Os,p.IssuuServices=Gi,p.ItemListSchema=Pa,p.JournalistArticule2=no,p.JournalistGroup=ao,p.LayoutNewsComponent=Jn,p.LazyLoader=Nd,p.LiveBlogHeader=Ys,p.Location=Ki,p.MainComponentServices=Ar,p.Marfeel=pa,p.MiddleSection=$e,p.Modulo1x3=na,p.Modulo1x3Card=po,p.Modulo1x4=uo,p.Modulo1x5=mo,p.Modulo2Columnas=$l,p.Modulo3Columnas=co,p.ModuloNewsletter=zl,p.ModuloOpinion=jl,p.NewListResponseDataPH=Uo,p.NewsArticle=Qa,p.NewsComponent=Bc,p.NewsContent=un,p.NextPrev=Et,p.OrgList=ja,p.PreloadImages=xn,p.REPORT_REASONS=Ue,p.Readest=rn,p.ScriptHydrator=Hc,p.SearchSection=Oc,p.Section=te,p.SectionCard=Ee,p.SectionCard2=Ut,p.SectionCardServerComponent=wn,p.SectionServerComponent=Fl,p.ShowSection=Ls,p.SocialNetworks=sc,p.SpeculationRules=Ma,p.StaticSlotWrapper=Uc,p.SubscribeColumn=$s,p.SubscribeRow=zs,p.SubscribeWhatsAppColumn=cl,p.TagComponent=Mc,p.TagSection=to,p.TimeLine=Ks,p.TrimPathname=dr,p.VideoBlock3=Nl,p.VideoBlock4=Tl,p.VideoSection=zc,p.VideosSchemas=$a,p.WebsiteList=Ga,p.addComment=Sd,p.bannersReplace=Wt,p.becomeVideoObject=nt,p.buildTagUrl=qn,p.coloringByStrokeSVGs=Hs,p.compileStyleProps=bn,p.cutString=be,p.extractRealtedNews=lr,p.formatDate=ye,p.formatDateEdiciones=ir,p.formatDateJournalistArticule=En,p.formatDateTimeline=_a,p.formatNewsMeta=Ea,p.formatVideoData=Ba,p.generalGetData=Hi,p.getCaptchaToken=ua,p.getComments=_n,p.getConfig=Y,p.getDynamicSlots=$i,p.getEnvironmentUrl=At,p.getEnvironmentUrlFront=ka,p.getImageUrl=ne,p.getNextMeta=wt,p.getPage=bt,p.getPreloadImages=pr,p.getPrevMeta=yt,p.getReportReasonLabel=Xc,p.getResponse=Na,p.getResponsePromise=Sa,p.getSchemas=Yt,p.getScriptReplaces=Bn,p.getSlugs=Va,p.getTypeOfNews=ur,p.getVideoRealPath=mr,p.initLibrary=rr,p.metadataToJSX=Ta,p.metadata_defaults=qs,p.parseTags=In,p.pathnameSplit=Ia,p.removePages=Ha,p.reportComment=Zc,p.shareButtons=Vs,p.socialIcons=cn,p.speculationRules=Da,p.speculationRulesHome=La,p.urlReplaces=Ua,p.verifyCaptchaTokenEnterprise=kd,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})}));
111
+ `}o+=y,r=h}return o+=e.slice(r),o}async function wc(e){const{news:n,banners:a,newsRelatedResponses:s,slug:o,itemList:r,socials:i,getVideos:l}=e;let d=n?.body?.rendered??"";d=d.replace(/&nbsp;/g,""),d=fc(d,a),d=gc(d),d=await Co(d),d=await pc(d,e.texts,s),d=await Ac(d,l),d=uc(d),d=mc(d);const c=n.main.sources??[];return t.jsxs("div",{className:yn.content,children:[o!=="liveblogs"&&e.showHeaderImage?n.hascontent?.hasgalleryimages?t.jsx(ia,{newsformated:n,internal:n.info.link.internal}):t.jsx(Ws,{preview:n.preview}):null,t.jsx(ae,{banners:a,name:"block_1"}),t.jsx("div",{className:yn.journalistArticleContent,children:t.jsx(ic,{autorIcon:e.autorIcon,socials:i,news:n,texts:e.texts,noteShare:e.noteShare,paths:e.paths})}),t.jsx(cc,{summary:n.main.summary}),t.jsx("div",{className:yn.contentNews,suppressHydrationWarning:!0,id:"content-news-section",dangerouslySetInnerHTML:{__html:d}}),t.jsx(ac,{texts:e.texts,itemList:r,banners:a,slug:o}),c.length>0&&t.jsxs("div",{className:yn.noteSource,children:[t.jsx(hc,{}),t.jsx("p",{children:e.texts.noteSource+(c.length===1?"":"s")+": "+c.map(h=>h.name).join(", ")})]})]})}const vo={content:"_content_cu8lm_1",title:"_title_cu8lm_18"},yc=async({newsformated:e,internal:n})=>{if(!n)return;const s=await new fe().getNewsMultimedia({path:n,imagesizes:e.preview.sizes[0]?.scale});if(!s)return;const o=s.data.data[0]?.videos.filter(r=>r.type==="video-embedded")[0];return t.jsxs("div",{className:vo.content,children:[t.jsx("div",{dangerouslySetInnerHTML:{__html:o?.code??""}}),t.jsx("p",{className:vo.title,children:o?.title})]})},la={content:"_content_cu8lm_1",title:"_title_cu8lm_18"},bc=async({newsformated:e,internal:n})=>{if(!n)return;const s=await new fe().getNewsMultimedia({path:n,imagesizes:e.preview.sizes[0]?.scale});if(!s)return;const o=s.data.data[0]?.videos.filter(r=>r.type==="video-youtube")[0];return t.jsxs("div",{className:la.content,children:[t.jsx("iframe",{className:la.iframeStyled,src:`https://www.youtube.com/embed/${o?.code??""}`,frameBorder:"0",allowFullScreen:!0}),t.jsx("p",{className:la.title,children:o?.title})]})},Cc={content:"_content_ezbiw_1"},vc=async({newsformated:e,internal:n})=>{if(!n)return;const s=await new fe().getNews({path:n,imagesizes:e.preview.sizes[0]?.scale});if(!s)return;const o=s.data.data[0]?.external?.iframe;return t.jsx("div",{className:Cc.content,dangerouslySetInnerHTML:{__html:o??""}})},_o={content:"_content_156j7_1"},Fe={imagen:"imagen",videoEmbedded:"videoEmbedded",videoYouTube:"videoYouTube",iframe:"iframe"},_c={[Fe.videoEmbedded]:yc,[Fe.videoYouTube]:bc,[Fe.iframe]:vc},Nc=({news:e})=>{const{config:n,hascontent:a,info:s}=e,o=n.articlepreview,r=s.link.internal,i=a?.hasgalleryimages;if(o===Fe.imagen&&i)return t.jsx("div",{className:_o.content,children:t.jsx(ia,{newsformated:e,internal:r})});const l=o?_c[o]:null;return l?t.jsx("div",{className:_o.content,children:t.jsx(l,{newsformated:e,internal:r})}):null},Sc=e=>{const{content:n,title:a,slot_id:s}=e,o=e.slot_id&&e.slot_id!=="Nota_1";return n&&n.length!==0&&t.jsx(te,{title:a,titleUrl:e.titleUrl,children:t.jsx(Ze,{slot_id:s,cardWidth:200,children:n.map((r,i)=>{const l={...r,main:{...r.main,title:{...r.main.title,section:o?r.main.title.home:r.main.title.section}}};return t.jsx(Ut,{...l,titleGradient:!0,paths:e.paths},i)})})})},kc=e=>{const{content:n,title:a,slot_id:s}=e,o=e.slot_id&&e.slot_id!=="Nota_1";return n&&n.length!==0&&t.jsx(te,{title:a,titleUrl:e.titleUrl,children:t.jsx(Ze,{slot_id:s,cardWidth:343,cardGap:32,visibleItems:3,children:n.map((r,i)=>{const l={...r,main:{...r.main,title:{...r.main.title,section:o?r.main.title.home:r.main.title.section}}};return t.jsx(Ut,{...l,titleGradient:!0,paths:e.paths},i)})})})},Ec=e=>{const{content:n,title:a,slot_id:s}=e,o=e.slot_id&&e.slot_id!=="Nota_1";return n&&n.length!==0&&t.jsx(te,{title:a,titleUrl:e.titleUrl,children:t.jsx(Ze,{slot_id:s,fullPageWidth:!0,visibleItems:1,pagination:!0,cardGap:0,children:n.map((r,i)=>{const l={...r,main:{...r.main,title:{...r.main.title,section:o?r.main.title.home:r.main.title.section}}};return b.createElement(Ut,{...l,key:i,titleGradient:!0,paths:e.paths})})})})},bn=e=>{const n={};for(const a in e)a.startsWith("--")&&(n[a]=e[a]);return n},Xe={headerSection:"_headerSection_1c69w_1",title:"_title_1c69w_11",subtitle:"_subtitle_1c69w_23",newsContent:"_newsContent_1c69w_36",containerCards:"_containerCards_1c69w_44",image:"_image_1c69w_50",blockHeadContainer:"_blockHeadContainer_1c69w_56"},Ic=e=>{const{content:n,title:a,isVideo:s}=e;if(!n||n.length===0)return;const o=n[0],r=n.slice(1),i=e.slot_id&&e.slot_id!=="Nota_1";return o&&r&&t.jsxs(te,{title:a,titleUrl:e.titleUrl,children:[t.jsx("div",{className:Xe.headerSection,children:t.jsxs("a",{style:{"--heightImageOverwriteMobile":"200%"},className:Xe.image,href:o?.info?.link?.url,target:o?.info?.link?.target,children:[t.jsxs("div",{className:Xe.blockHeadContainer,children:[t.jsx("p",{className:Xe.title,children:o?.main?.title.home}),o?.main?.subtitle?.rendered&&t.jsx("p",{className:Xe.subtitle,children:o?.main?.subtitle?.striped})]}),t.jsx(ge,{preview:o.preview})]})}),t.jsxs("div",{className:Xe.containerCards,children:[t.jsx("div",{className:"banner-context",style:{order:1},children:e.banner}),t.jsx("div",{className:Xe.newsContent,children:Array.isArray(r)&&r.map((l,d)=>{const c={...l,main:{...l.main,title:{...l.main.title,section:i?l.main.title.home:l.main.title.section}}};return t.jsx("div",{style:{order:d},children:t.jsx(Ee,{...c,isVideo:s,paths:e.paths})},d)})})]})]})},No={banner:e=>t.jsx(ae,{...e,name:e.slot_id.replace("Home","block")}),readest:e=>t.jsx(rn,{...e}),"Modulo 1x3":e=>t.jsx(na,{...e}),"Modulo 1x4":e=>t.jsx(uo,{...e}),"Modulo 1x5":e=>t.jsx(mo,{...e}),"Destacado noticias":e=>t.jsx(io,{...e}),"Destacado full width":e=>t.jsx(Ic,{...e}),"Destacado videos":e=>t.jsx(fo,{...e}),"Carrusel card":e=>t.jsx(Ao,{...e}),"Carrusel story":e=>t.jsx(Sc,{...e}),"Carrusel owl":e=>t.jsx(kc,{...e}),"Modulo fotogaleria":e=>t.jsx(Ec,{...e}),"Carrusel opinion":e=>t.jsx(wo,{...e}),"Modulo 1x3 card":e=>t.jsx(po,{...e})};function ca({component:e,slot_id:n,data:a,banners:s}){if(s)return No[e]&&t.jsx("div",{className:"home-slot",style:bn(a),children:No[e]({...a,banners:s,slot_id:n})})}function Uc({children:e,stylesConfigEntry:n}){return t.jsx("div",{className:"home-slot",style:bn(n),children:e})}const So={Diario:e=>{if(!e?.data||e.data.length===0)return;const n=e.data.slice(1);return t.jsx(so,{...e.data[0],itemReverseOrder:!0,isLarge:!0,block:n,banners:e.banners,showSuper:e.showSuper,rightOnlyBanner:e.rightOnlyBanner,customSectionCardStyles:e.customSectionCardStyles,customNewsDescriptionStyles:e.customNewsDescriptionStyles,paths:e.paths})},"Diario con imagen":e=>{if(!e?.data||e.data.length===0)return;const n=e.data.slice(1);return t.jsx(so,{...e.data[0],itemReverseOrder:!0,isLarge:!0,showSuper:e.showSuper,block:n,banners:e.banners,customSectionCardStyles:e.customSectionCardStyles,customNewsDescriptionStyles:e.customNewsDescriptionStyles,paths:e.paths})},Super:e=>t.jsx(mt,{...e.data[0],paths:e.paths}),"3 notas verticales":e=>t.jsx(Ol,{content:e.data,customLargeSection:e.customLargeSection,customSlimSection:e.customSlimSection,paths:e.paths}),"3 notas horizontales":e=>t.jsx(Pl,{content:e.data,customLargeSection:e.customLargeSection,customSmallSection:e.customSmallSection,paths:e.paths})},Cn=({component:e,data:n,banners:a,rightOnlyBanner:s})=>t.jsx("div",{style:bn(n),children:So[e]&&So[e]({...n,rightOnlyBanner:s,banners:a})}),Tc=({slots:e,DYNAMIC_SLOT_SUBINDEXES:n,stylesConfig:a,AutorIcon:s,config:o,banners:r})=>{const i=[],d=n,c=Object.keys(e).length/d;for(let h=1;h<=c;h++)for(let u=1;u<=d;u++){const f="Home_"+h+"_"+u;!e[f]||!e[f].blockSass||!e[f].blockSass[0]||!e[f].blockSass[0].value||!e[f].blockSass[0].block||e[f].blockSass[0].block==="No Mostrar"||i.push(t.jsxs(Ls,{show:!!e[f].content?.data,order:(h-1)*d+(u-1),children:[t.jsx(ca,{component:e[f].blockSass[0].block,banners:r,slot_id:f,data:{...e[f].blockSass[0].block?a[e[f].blockSass[0].block]:[],content:e[f].content?.data??[],title:e[f].blockSass[0].title??void 0,titleUrl:e[f].blockSass[0].link??void 0,autorIcon:t.jsx(s,{}),paths:o.paths}}),t.jsx($e,{children:t.jsx(Te,{banners:r,index:"dynamic_"+h+"_"+u})})]},h+"_"+u))}return i},xc=({mainBlock:e,StylesConfigMain:n,config:a,banners:s})=>{const{PUBLIC_ENV:o}=Y();if(o!=="local")return null;const r=e?.news?.data||[],i=(l,d)=>({...e?.news,...n[l],data:r.slice(0,d),paths:a.paths});return t.jsxs(t.Fragment,{children:[t.jsx(Cn,{component:"Super",data:i("Super",1),banners:s}),t.jsx($e,{children:t.jsx(Te,{banners:s,index:1})}),t.jsx(Cn,{component:"3 notas verticales",data:i("3 notas verticales",3),banners:s}),t.jsx($e,{children:t.jsx(Te,{banners:s,index:1})}),t.jsx(Cn,{component:"3 notas horizontales",data:i("3 notas horizontales",3),banners:s}),t.jsx($e,{children:t.jsx(Te,{banners:s,index:1})})]})},qc=e=>{const{config:n,hascontent:a}=e,s=n.articlepreview,o=[Fe.videoEmbedded,Fe.videoYouTube,Fe.iframe];return!!(s===Fe.imagen&&a?.hasgalleryimages||o.includes(s))},Bc=async e=>{const{custom_complement:n,ranking:a=[],banners:s,autor:o=[],news:r=[],newsRelatedResponses:i=[],itemList:l=[],socials:d,getVideos:c}=e,h=e.slug==="liveblogs";if(!(!r||!r[0]))return t.jsx(t.Fragment,{children:t.jsxs(Kl,{className:ra.contentLayout2,children:[t.jsx(Zl,{option:e.slug,news:r,paths:e.paths}),t.jsx(Te,{banners:s,index:1}),!h&&t.jsx(Nc,{news:r[0]}),t.jsx(Jl,{texts:e.texts,paths:e.paths,slug:e.slug,itemList:l,ranking:a,bannerTop:t.jsx(ae,{banners:s??[],name:"right_1"}),banner:t.jsx(ae,{banners:s??[],name:"right_2"}),complement:n||t.jsxs("div",{id:"comentarios",suppressHydrationWarning:!0,children:[o.length>0&&t.jsx(no,{texts:e.texts,autorIcon:e.autorIcon,autor:o[0],paths:e.paths}),r[0].authors.length>1&&t.jsx(ao,{news:r[0],autorIcon:e.autorIcon,paths:e.paths,texts:e.texts}),t.jsx("div",{className:ra.tagContent,children:t.jsx(to,{tags:r[0]?.keywords?.tags,paths:e.paths})}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"2rem"},suppressHydrationWarning:!0,children:[e.showComments&&t.jsx("div",{suppressHydrationWarning:!0,"data-hydrate":"LazyLoader","data-props":encodeURIComponent(JSON.stringify({render:"comment",internalPath:e.internalPath}))}),t.jsx($e,{children:t.jsx(Te,{banners:s,index:2})}),t.jsx(ca,{component:"Carrusel card",banners:[],slot_id:"Nota_1",data:{...e.stylesConfig["Carrusel card"],content:e.relatedNewsList??[],title:e.texts.relatedNewsTitle,titleUrl:void 0}}),t.jsx($e,{children:t.jsx(Te,{banners:s,index:3})}),t.jsx(te,{title:e.texts.moreNewsTitle,children:t.jsx("div",{suppressHydrationWarning:!0,"data-hydrate":"LazyLoader","data-props":encodeURIComponent(JSON.stringify({render:"more",stylesConfig:e.stylesConfig,section:r[0].info.section?.slug??"",currentNews:r[0]}))})}),t.jsx($e,{children:t.jsx(Te,{banners:s,index:4})})]})]}),children:t.jsxs("section",{style:{"--avatar-content-align-items-desk":e.slug==="liveblogs"?"flex-start":"center"},children:[t.jsx(wc,{texts:e.texts,autorIcon:e.autorIcon,socials:d,news:r[0],banners:s,newsRelatedResponses:i,itemList:l,slug:e.slug,getVideos:c,noteShare:e.noteShare,paths:e.paths,showHeaderImage:!qc(r[0])}),t.jsx(ae,{banners:s??[],name:"block_3"})]})})]})})},pt={content:"_content_1tl6i_1",contentInfo:"_contentInfo_1tl6i_24",imageStyled:"_imageStyled_1tl6i_41",name:"_name_1tl6i_46",description:"_description_1tl6i_51",contentInfoWithoutImg:"_contentInfoWithoutImg_1tl6i_104"},Lc=async e=>{const n=e.img?await ne(e.img):"";return t.jsx("section",{className:pt.content,children:t.jsxs("div",{className:`${pt.contentInfo} ${n?"":pt.contentInfoWithoutImg}`,children:[e.img&&t.jsx("img",{fetchPriority:"low",loading:"lazy",className:pt.imageStyled,src:n}),t.jsx("h1",{className:pt.name,children:e.tag}),e.description&&t.jsx("div",{className:pt.description,dangerouslySetInnerHTML:{__html:e.description}})]})})},vn={content:"_content_7wvro_1",contentInfo:"_contentInfo_7wvro_23",name:"_name_7wvro_34",description:"_description_7wvro_43"},Dc=e=>t.jsx("section",{className:vn.content,style:{color:e.textColor,"--backDropHeigth":e.backDropHeigth?e.backDropHeigth:"100%",padding:e.sectionPadding??"","--backgroundColor":e.backgroundColor},children:t.jsxs("div",{className:vn.contentInfo,children:[t.jsx("h1",{className:vn.name,style:{color:e.textColor},children:e.tag}),e.description&&t.jsx("div",{style:{color:e.textColor},className:vn.description,dangerouslySetInnerHTML:{__html:e.description}})]})}),Mc=e=>{const{option:n,entity:a}=e;switch(n){case"op1":return t.jsx(Lc,{tag:a?.name??"",img:a?.image?.url??"",description:a?.description?a?.description:""});case"op2":return t.jsx(Dc,{tag:a?.name??"",description:a?.description?a?.description:"",backDropHeigth:e.backDropHeigth,backgroundColor:e.backgroundColor,sectionPadding:e.sectionPadding,textColor:e.textColor});default:return t.jsx(t.Fragment,{})}},Mt={content:"_content_gxziw_1",buttonStyled:"_buttonStyled_gxziw_9",searchStyled:"_searchStyled_gxziw_21",inputStyled:"_inputStyled_gxziw_32",inputStyledTest:"_inputStyledTest_gxziw_51"},Pc=e=>t.jsx("svg",{width:"68",height:"68",viewBox:"0 0 68 68",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t.jsx("g",{opacity:"0.8",children:t.jsx("path",{d:"M47.8043 46.6003L47.6635 46.7758L47.8232 46.9342L56.4762 55.5171C56.4768 55.5177 56.4774 55.5184 56.478 55.519C56.8524 55.9072 57.0616 56.4256 57.0616 56.965C57.0616 57.5048 56.8521 58.0234 56.4774 58.4117C56.2839 58.6065 56.0539 58.7611 55.8005 58.8667C55.5466 58.9724 55.2743 59.0269 54.9993 59.0269C54.7243 59.0269 54.452 58.9724 54.1981 58.8667C53.9442 58.7609 53.7138 58.6059 53.5201 58.4106L53.5194 58.4099L44.9327 49.8232L44.7743 49.6648L44.5995 49.805C40.4597 53.1252 35.2051 54.7331 29.9162 54.2981C24.6272 53.863 19.706 51.4181 16.1643 47.4661C12.6227 43.514 10.7298 38.3552 10.875 33.0503C11.0201 27.7455 13.1923 22.6979 16.9447 18.9455C20.6972 15.193 25.7448 13.0209 31.0496 12.8757C36.3544 12.7305 41.5133 14.6234 45.4653 18.165C49.4174 21.7067 51.8623 26.6279 52.2974 31.9169C52.7324 37.2058 51.1245 42.4604 47.8043 46.6003ZM22.4528 47.4552C25.1799 49.2774 28.3861 50.25 31.666 50.25C36.0641 50.25 40.2822 48.5029 43.3921 45.3929C46.5021 42.2829 48.2493 38.0649 48.2493 33.6667C48.2493 30.3868 47.2767 27.1806 45.4545 24.4535C43.6323 21.7264 41.0423 19.6008 38.0121 18.3457C34.9819 17.0905 31.6476 16.7621 28.4307 17.402C25.2139 18.0419 22.259 19.6213 19.9398 21.9405C17.6205 24.2597 16.0411 27.2146 15.4013 30.4314C14.7614 33.6483 15.0898 36.9827 16.345 40.0129C17.6001 43.0431 19.7256 45.633 22.4528 47.4552Z",fill:"white",stroke:"white",strokeWidth:"0.5"})})}),Oc=e=>t.jsx("form",{className:Mt.content,style:{height:e.hasContent?"218px":"50vh"},children:t.jsxs("div",{className:Mt.inputStyled,children:[t.jsx("input",{className:Mt.inputStyledTest,defaultValue:e.query,name:"query",placeholder:e.texts.searchKeyWord+"..."}),t.jsx("button",{className:Mt.buttonStyled,type:"submit",children:t.jsx(Pc,{className:Mt.searchStyled})})]})}),da={content:"_content_io3tv_1",newsContentSection:"_newsContentSection_io3tv_5",itemContent:"_itemContent_io3tv_10"},Qc=e=>{const{data:n,option:a,autor:s,page:o,banners:r,pathname:i,ranking:l,currentPage:d,slug:c,texts:h={}}=e,u=[5,10,15],f={5:1,10:2,15:3};switch(a){case"op1":return t.jsx(t.Fragment,{children:t.jsxs(Yn,{children:[t.jsx(Js,{autor:s[0],autorIcon:e.autorIcon}),t.jsx(Jn,{paths:e.paths,ranking:l,readestTitle:h.readestTitle??"",bannerTop:t.jsx(ae,{banners:r??[],name:"right_1"}),banner:t.jsx(ae,{banners:r??[],name:"right_2"}),children:t.jsx("section",{className:da.content,children:n.length>0?t.jsx(un,{className:[da.newsContentSection,"padding-0"].join(" "),paginatorComponent:t.jsx(Et,{texts:h,pathname:i,query:"",currentPage:d,maxPages:e.paginationLimit,showNext:!(n.length<e.newsListLimit)}),children:Array.isArray(n)&&n?.map((y,m)=>t.jsxs(b.Fragment,{children:[u.includes(m+1)&&t.jsx("div",{className:da.itemContent+" banner-context",children:t.jsx(ae,{banners:r??[],name:`block_2_${f[m+1]}`})}),t.jsx(wn,{autorIcon:e.autorIcon,item:y,option:c,paths:e.paths},m)]},m))}):t.jsx("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",gap:"2rem"},children:t.jsx("p",{style:{fontWeight:"var(--fw)",width:"100%",fontSize:"18px",lineHeight:"26px",textAlign:"center"},children:h.autorNotResultMessage})})})})]})});case"op2":return t.jsx(t.Fragment,{children:t.jsxs(Yn,{children:[t.jsx(Zs,{autor:s[0],autorIcon:e.autorIcon}),Array.isArray(n)?t.jsxs(t.Fragment,{children:[t.jsx(na,{content:n,title:"",hasLines:!0,banners:e.banners,bannerPositionIndex:[1,6,12],paths:e.paths,slot_id:"block_2"}),t.jsx(Et,{texts:h,query:"",pathname:i,maxPages:Number(e.paginationLimit),currentPage:Number(o),showNext:!((n.length??0)<Number(e.newsListLimit))})]}):t.jsx("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",gap:"2rem"},children:t.jsx("p",{style:{fontWeight:"var(--fw)",width:"100%",fontSize:"18px",lineHeight:"26px",textAlign:"center"},children:h.autorNotResultMessage})})]})});default:return t.jsx(t.Fragment,{})}},ko={content:"_content_pq89v_1",videoContent:"_videoContent_pq89v_9"},Pt={container:"_container_1xr2t_1",playStyled:"_playStyled_1xr2t_6",imageStyled:"_imageStyled_1xr2t_13",longer:"_longer_1xr2t_26",contentNews:"_contentNews_1xr2t_31",tagContent:"_tagContent_1xr2t_51",tag:"_tag_1xr2t_51",titular:"_titular_1xr2t_68",small:"_small_1xr2t_81",figure:"_figure_1xr2t_87",backDrop:"_backDrop_1xr2t_92",backDropAux:"_backDropAux_1xr2t_100"},Eo=async e=>{const{size:n="longer",video:a}=e,s=a.main.image.sizes[0]?.url??"";return t.jsx("figure",{className:Pt.figure,children:t.jsxs("span",{className:Pt.backdrop,children:[t.jsx("span",{className:Pt.backDropAux}),t.jsx(T,{href:a.info.link.url,target:a.info.link.target,children:t.jsxs("div",{children:[a.main.image.sizes.map(async(o,r)=>o.width>=580?t.jsx("source",{media:"(width >=900px)",srcSet:await ne(o.url)},r):t.jsx("source",{media:"(width <900px)",srcSet:await ne(o.url)},r)),t.jsx("img",{fetchPriority:"low",loading:"lazy",className:[Pt.imageStyled,Pt[n]].join(" "),alt:"",src:s?await ne(s):""})]})})]})})},jc=e=>{const{videos:n}=e;return t.jsx("div",{className:ko.content,children:t.jsx(rt,{children:t.jsx(te,{title:"Videos",isTitle:!0,children:t.jsxs("div",{className:ko.videoContent,children:[t.jsx(Eo,{video:n[0]}),t.jsx("div",{style:{display:"flex",flexDirection:"column"},children:n.slice(1).map((a,s)=>t.jsx(Eo,{size:"small",video:a},`video-small-${s}`))})]})})})})},Re={content:"_content_ruy5q_1",videoContent:"_videoContent_ruy5q_9",articleSection:"_articleSection_ruy5q_21",contentLatout:"_contentLatout_ruy5q_31",title:"_title_ruy5q_36",article:"_article_ruy5q_21",correspondent:"_correspondent_ruy5q_64"},Io={container:"_container_1rq2h_1",playStyled:"_playStyled_1rq2h_9"},Gc=e=>{const{video:n}=e;return t.jsx(T,{href:n.info.link.url?n.info.link.url:void 0,target:n.info.link.target,children:t.jsxs("section",{className:Io.container,children:[t.jsx(ge,{isLarge:!0,preview:{sizes:n.main.image.sizes,description:n.main.description}}),t.jsx(lt,{className:Io.playStyled})]})})},$c=e=>{const n=()=>e?.video.main.author?`${e?.video.main.author} - ${ye(e.video.info.date.created)}`:e?.video.main.author;return t.jsx("div",{className:Re.content,children:t.jsx(rt,{className:Re.contentLatout,children:t.jsx(te,{title:"Videos",isTitle:!0,children:t.jsxs("div",{className:Re.videoContent,children:[t.jsx(Gc,{video:e.video}),t.jsxs("div",{className:Re.articleSection,children:[t.jsx(T,{className:Re.title,href:e.video.info.link.url,target:e.video.info.link.target,children:e.video.main.title}),t.jsx("p",{className:Re.article,children:be(e.video.main.description)}),t.jsx("p",{className:Re.correspondent,children:n()})]})]})})})})},zc=e=>{switch(e.option){case"op1":return t.jsx(jc,{videos:e.data});case"op2":return t.jsx($c,{video:e.data[0]});default:return t.jsx(t.Fragment,{})}};function Hc({containerId:e,containerId2:n}){return b.useEffect(()=>{try{let a=function(){const h=window.twttr;h?.widgets?h.widgets.load(s):c<10?(c++,requestAnimationFrame(a)):console.warn("No se pudo cargar widgets de Twitter")};const s=document.getElementById(e),o=document.getElementById(n);if(!s&&!o)return;const r=s?.querySelectorAll("script[src]")??[],i=o?.querySelectorAll("script[src]")??[];[...r,...i].forEach(h=>{const u=document.createElement("script");Array.from(h.attributes).forEach(f=>{u.setAttribute(f.name,f.value)}),h.replaceWith(u)});const d=document.querySelectorAll('script[src*="platform.twitter.com/widgets.js"]');if(d)for(let h=0;h<d.length;h++)d[h]?.remove();let c=0;if(document.querySelector('script[src*="platform.twitter.com/widgets.js"]'))a();else{const h=document.createElement("script");h.src="https://platform.twitter.com/widgets.js",h.async=!0,h.onload=a,document.body.appendChild(h)}}catch(a){console.warn("Error al procesar embeds de Twitter",a)}},[e]),null}const Vc=e=>{const{isVideo:n=!1,isLarge:a=!1,hasShadow:s=!1,BackDropAuxHeigthMobile:o}=e,r=b.useMemo(()=>e?.preview?.sizes||[],[e?.preview?.sizes]);if(!r.length||!r[0]?.url||r[0]?.url==="")return t.jsx("div",{className:K.imagePlaceholder});const{PUBLIC_API_HOST:i,PUBLIC_ENV:l}=Y();return t.jsx("figure",{className:K.figure,children:t.jsxs("span",{className:K.backdrop,children:[t.jsx("span",{className:K.backdropAux,style:{height:o||"56.25%"}}),t.jsxs("picture",{children:[t.jsx("img",{fetchPriority:"low",loading:"lazy",className:K.imageStyled,alt:e.preview?.description||"",src:(l==="local"?i:"")+r[0]?.url,style:{boxShadow:s?"0px 4px 8px 0px #00000033":"0px"}}),n&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:K.boxPlayIcon,style:{height:a?"40%":"72px"}}),t.jsx(lt,{className:K.playStyled,style:{width:a?"3rem":"27px",height:a?"3rem":"27px",marginBottom:a?"18px":".5rem",marginLeft:a?"30px":".5rem"}})]})]})]})})},Fc=e=>t.jsx("svg",{width:"41",height:"33",viewBox:"0 0 41 33",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t.jsx("path",{d:"M17.9576 21.2985C16.8233 21.2985 15.9277 22.194 15.9277 23.3283C15.9277 24.4627 16.8233 25.3582 17.9576 25.3582C19.0919 25.3582 19.9874 24.4627 19.9874 23.3283C19.9874 22.194 19.0919 21.2985 17.9576 21.2985ZM17.9576 19.2686C19.0919 19.2686 19.9874 18.3731 19.9874 17.2388C19.9874 16.1045 19.0919 15.2089 17.9576 15.2089C16.8233 15.2089 15.9277 16.1045 15.9277 17.2388C15.9277 18.3731 16.8233 19.2686 17.9576 19.2686ZM17.9576 13.1791C19.0919 13.1791 19.9874 12.2836 19.9874 11.1492C19.9874 10.0149 19.0919 9.11938 17.9576 9.11938C16.8233 9.11938 15.9277 10.0149 15.9277 11.1492C15.9277 12.2836 16.8233 13.1791 17.9576 13.1791Z",fill:"#7B888A"})}),Uo={info:{section:{name:"",slug:"",url:""},link:{url:"invalidUrl",target:"",canonical:!1,internal:""},date:{date:"",created:0,modified:0,firstpublish:0,lastpublish:0}},config:{zonehome:void 0,priorityhome:"",zonesection:"",prioritysection:"",homepreview:"",showcomments:!0,showtime:!0,showauthor:!0,showuppertitle:!0,showsubtitle:!0,showads:!0},main:{title:{home:"",section:"",article:""},subtitle:{rendered:"",striped:""},tags:[]},authors:[{firstname:"",lastname:"",fullname:"",image:void 0,name:"",internaluser:!1}],preview:void 0},To=6,Wc=({section:e,currentNews:n,banner:a,isVisible:s=!1,stylesConfig:o})=>{const[r,i]=b.useState({data:Array.from({length:To},()=>Uo)}),[l,d]=b.useState(!1),c=b.useCallback(async()=>{if(!(l||!n?.info?.link?.internal)){d(!0);try{const h=new URLSearchParams({section:e,currentNewsLink:n.info.link.internal}),u=await fetch(`/api/get-more-news?${h}`);if(!u.ok)throw i(void 0),new Error(`HTTP error! status: ${u.status}`);const f=await u.json();i({...f,data:f.data.slice(0,To)})}catch(h){console.error("[/api/get-more-news] Error:",h.message),i(void 0)}}},[e,n.info.link.internal,l]);return b.useEffect(()=>{s&&c()},[s,r,c]),!r?.data||r.data.length===0?null:t.jsx(Yc,{news:r.data,title:"Más Noticias",...o["Modulo 1x3 Client"]??o["Modulo 1x3"],hasLines:!0,showSubtitle:!0,rounded:!0,banner:a,isVisible:s})},Yc=e=>{const{news:n,hasLines:a=!1}=e,s=o=>a&&(o+1)%3!==0?oa.contentSeparator:"";return t.jsx("div",{className:oa.newsContent,style:{gap:a?"30px":"20px","--gridTemplateModlule":a?"repeat(auto-fit, 343px);":"repeat(auto-fit, 380px);"},children:n.map((o,r)=>{const{main:i,authors:l,info:d,preview:c,isVideo:h=!1,config:u,overImage:f="default",isTitle:y=!1,isLarge:m=!1}=o;return t.jsx("div",{className:s(r),style:{order:r},children:t.jsxs("section",{className:It.content,children:[t.jsx(T,{title:i?.title?.section,href:d?.link?.url??"invalidUrl","aria-label":i?.title?.section??"nota",target:d?.link?.target,children:t.jsx(Vc,{isVisible:e.isVisible,preview:c,rounded:e.rounded,isVideo:h,isLarge:m,getImageUrl:e.getImageUrl})}),t.jsx("div",{className:It.newsDescription,children:t.jsx(Kc,{main:i,authors:l,info:d,preview:c,share:e.share,config:u,overImage:f,isTitle:y,paths:o.paths,isVisible:e.isVisible})})]})},r)})})},Kc=e=>{const{share:n=!1,cutSubtitle:a=!0}=e,o=(()=>{if(!e?.authors||e.authors.length===0)return"";const r=e.authors[0],i=ye(e.info?.date?.modified);return r&&e?.config?.showtime&&e.config?.showauthor?`${r.fullname} - ${i}`:r&&e.config?.showauthor?r.fullname:e?.config?.showtime?i:""})();return t.jsxs("div",{className:F.boxInformation,children:[n&&t.jsx(Fc,{className:F.dotStyles}),e?.info?.section?.url&&t.jsxs("div",{className:F.sectionDescriptionContainer,children:[t.jsx(T,{className:F.sectionDescription,href:e.info.section.url??"invalidUrl",children:e.info.section.name}),e?.main?.uppertitle&&t.jsx("p",{className:F.uppertitle,children:e.main.uppertitle})]}),t.jsx("h2",{className:F.articule,children:t.jsx(T,{className:F.linkStyled,style:{"--isLink":e?.info?.link?.url?"underline":"none"},"aria-label":e.main?.title?.section??"nota",href:e?.info?.link?.url,target:e?.info?.link?.target,children:e.main?.title?.section})}),e.config?.showsubtitle&&e.main?.subtitle?.striped&&t.jsx("p",{className:F.description,style:{"--fontSizeSubTitle":e.fontSizeSubTitle,"--lineHeightSubTitle":e.lineHeightSubTitle,"--colorSubTitle":e.colorSubTitle},children:a?be(e.main.subtitle.striped):e.main.subtitle.striped}),(e?.config?.showtime||e.config?.showauthor)&&o&&t.jsx(t.Fragment,{children:e.authors?.[0]?.internaluser?t.jsx(T,{className:F.correspondentLink,href:`/autor/${e.authors[0].name}`,children:o}):t.jsx("div",{className:F.correspondent,children:o})})]})},Jc=({user:e,handleLogout:n,message:a})=>{const s=()=>{const r=document.querySelector(".user-actions-options");r&&r.classList.toggle("show")},o=e.firstname??"Usuario";return t.jsx("div",{className:"comment-item",children:t.jsxs("div",{style:{display:"flex",gap:"14px"},children:[e&&e.picture&&e.picture!==""?t.jsx("img",{className:"comment-avatar-img",src:e.picture,alt:e.username}):t.jsx("div",{className:"comment-avatar",children:o.charAt(0).toUpperCase()}),t.jsxs("div",{style:{flex:1},children:[t.jsxs("div",{className:"comment-header",children:[t.jsxs("span",{className:"comment-username user-welcome",children:["Hola ",o,"!"]}),t.jsx("div",{className:"user-actions-options",children:t.jsx("button",{onClick:()=>{n()},children:"Cerrar Sesion"})}),t.jsx("button",{className:"user-actions-span",onClick:s,children:t.jsx(gn,{width:13,height:13,fill:"black"})})]}),t.jsx("p",{className:"comment-text",children:a})]})]})})},ee={overlay:"_overlay_qj491_3",popup:"_popup_qj491_17",title:"_title_qj491_40",optionsContainer:"_optionsContainer_qj491_52",option:"_option_qj491_52",radioInput:"_radioInput_qj491_66",radioCustom:"_radioCustom_qj491_70",optionLabel:"_optionLabel_qj491_97",buttons:"_buttons_qj491_110",cancelButton:"_cancelButton_qj491_117",closeButton:"_closeButton_qj491_118",buttonAlone:"_buttonAlone_qj491_137",reportButton:"_reportButton_qj491_143",successContainer:"_successContainer_qj491_163",thumbsUp:"_thumbsUp_qj491_171",successMessage:"_successMessage_qj491_177",errorMessage:"_errorMessage_qj491_218",loadingContainer:"_loadingContainer_qj491_231"},xo=async e=>{const{PUBLIC_ENV:n}=Y();if(n==="local")return!0;if(!e)return!1;try{const i=await(await fetch("https://recaptchaenterprise.googleapis.com/v1/projects/undefined/assessments?key=undefined",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event:{token:e,siteKey:void 0}})})).json();return console.log("reCAPTCHA Enterprise verification result:",i),i.tokenProperties?.valid===!0}catch(a){return console.error("Error verificando reCAPTCHA Enterprise:",a),!1}};async function Zc({publication:e,username:n,id:a,type:s,baseUrl:o,captchaToken:r,apiToken:i}){if(!e||!n||!a||!s||!r)throw new Error("Faltan parámetros requeridos: publication, username, id, type, captchaToken");if(typeof e!="string"||typeof n!="string"||typeof a!="string"||typeof s!="string"||typeof r!="string")throw new Error("Todos los parámetros deben ser strings");if(!await xo(r))throw new Error("Token de captcha inválido");if(!i)throw new Error("Falta el token de API del CMS");const l=`${o}/system/modules/com.tfsla.diario.base/templates/hit/5.0/1/newcomments/report`,d=encodeURIComponent(s),c=new URLSearchParams({publication:e,username:n,id:a,type:d}),h=`${l}?${c.toString()}`;try{console.log("Reporting comment:",{publication:e,username:n,id:a,type:s,encodedType:d,url:h});const u=await V.post(h,null,{headers:{"User-Agent":"Bluestack","x-api-token":i,"Content-Type":"application/json"}});if(console.log("Report response:",u.data),u.status===200||u.status===201)return{type:"success",message:"Comentario reportado exitosamente",status:u.status,data:u.data};throw new Error(`Respuesta inesperada del servidor: ${u.status}`)}catch(u){if(console.error("Error reporting comment:",u),V.isAxiosError(u)){const f=u.response?.status,y=u.response?.data;throw f===400?new Error("Datos inválidos para el reporte"):f===401?new Error("Token de API inválido"):f===403?new Error("Acceso denegado para reportar comentario"):f===404?new Error("Comentario no encontrado"):f===409?new Error("El comentario ya fue reportado por este usuario"):f===500?new Error("Error interno del servidor CMS"):new Error(y?.error||y?.message||`Error HTTP ${f}: No se pudo reportar el comentario`)}throw u}}const Ue={spam:"Es spam o contenido comercial no deseado",inappropriate:"Lenguaje inadecuado",hate:"Discurso o símbolos de odio",misinformation:"Información falsa o fraude",terrorism:"Promueve el terrorismo",intellectual:"Violación de propiedad intelectual",bullying:"Bullying o acoso"};function Xc(e){return Ue[e]}const et=300,je={username:"anonimo",firstname:"Usuario",lastname:"Anonimo"};function Rc(e){const n=e.split(" ");if(n.length!==3)return e;const[a,s,o]=n,r=s.charAt(0).toUpperCase()+s.slice(1).toLowerCase();return`${a} ${r} ${o}`}const ha=(e,n)=>{if(!e||!e.current)return{boolean:!1,text:""};const a=e.current?.value||"",s=a.length>et,{PUBLIC_ENV:o}=Y(),r=o==="local",i=a.trim()!==""&&(r||n!=="")&&!s,l=s?`No debes exceder el limite de ${et} caracteres.`:"Debes completar todos los campos para comentar.";return{boolean:i,text:l}},qo=e=>{const n=e.cookie.split("; ").find(a=>a.startsWith("reported="));if(!n)return[];try{return JSON.parse(decodeURIComponent(n.split("=")[1]??""))}catch{return[]}},ed=(e,n)=>{const a=qo(e);a.includes(n)||(a.push(n),e.cookie=`reported=${encodeURIComponent(JSON.stringify(a))}; path=/; max-age=${3600*24*1}`)};function td(e){const[n,a]=e.split("@");if(!n||!a)return e;let s="";n.length<=2?s=n[0]+"*":s=n[0]+"*".repeat(n.length-2)+n[n.length-1];const o=a.lastIndexOf(".");if(o===-1)return`${s}@${a}`;const r=a.slice(0,o),i=a.slice(o);let l="";return r.length<=2?l=r[0]+"*":l=r[0]+"*".repeat(r.length-2)+r[r.length-1],`${s}@${l}${i}`}const _={overlay:"_overlay_tlrod_1",header:"_header_tlrod_18",logo:"_logo_tlrod_25",card:"_card_tlrod_32",close:"_close_tlrod_47",form:"_form_tlrod_71",formUl:"_formUl_tlrod_80",field:"_field_tlrod_92",label:"_label_tlrod_99",input:"_input_tlrod_108",error:"_error_tlrod_126",primary:"_primary_tlrod_132",divider:"_divider_tlrod_167",google:"_google_tlrod_193",googleIcon:"_googleIcon_tlrod_223",spin:"_spin_tlrod_256",checkboxRow:"_checkboxRow_tlrod_278",switch:"_switch_tlrod_307",terms:"_terms_tlrod_315",message:"_message_tlrod_346",passwordChecker:"_passwordChecker_tlrod_351",valid:"_valid_tlrod_370",invalid:"_invalid_tlrod_374",forgotPassword:"_forgotPassword_tlrod_378",successContainer:"_successContainer_tlrod_397",thumbsUp:"_thumbsUp_tlrod_405",successMessage:"_successMessage_tlrod_411"},Ge=()=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",width:"24",height:"24",viewBox:"0 0 32 32",className:_.spin,children:t.jsx("path",{d:"M18,4.181v2.021c4.559,0.929,8,4.97,8,9.798c0,5.514-4.486,10-10,10S6,21.514,6,16c0-4.829,3.441-8.869,8-9.798V4.181 C8.334,5.137,4,10.066,4,16c0,6.617,5.383,12,12,12s12-5.383,12-12C28,10.066,23.666,5.137,18,4.181z"})}),nd=({isOpen:e,onClose:n,commentId:a,publication:s,username:o})=>{const[r,i]=b.useState("form"),[l,d]=b.useState(""),[c,h]=b.useState(""),[u]=b.useState(""),f=[{id:"spam",label:Ue.spam},{id:"inappropriate",label:Ue.inappropriate},{id:"hate",label:Ue.hate},{id:"misinformation",label:Ue.misinformation},{id:"terrorism",label:Ue.terrorism},{id:"intellectual",label:Ue.intellectual},{id:"bullying",label:Ue.bullying}],y=async()=>{if(!(!l||!a)){if(qo(document).includes(a)){h("Ya has reportado este comentario.");return}i("loading"),h("");try{const w=await(await fetch("/api/comments-report",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({publication:s,username:o,id:a,captchaToken:u,type:Ue[l]})})).json();if(w.type==="success")ed(document,a),i("success"),setTimeout(()=>{m()},3e3);else throw new Error(w.message||"Error al reportar comentario")}catch(g){console.error("Error reporting comment:",g),h(g.message||"Error al reportar comentario"),i("form")}}},m=()=>{i("form"),d(""),h(""),n()};return!e||!a||!o?null:t.jsx("div",{className:ee.overlay,children:t.jsxs("div",{className:ee.popup,children:[t.jsx("button",{className:"close-reply-form",onClick:m,children:t.jsx(ct,{})}),t.jsx("h2",{className:ee.title,children:"Reportar Abuso"}),r==="loading"&&t.jsx("div",{className:ee.loadingContainer,children:t.jsx(Ge,{})}),r==="form"||r==="loading"?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:ee.optionsContainer,children:f.map(g=>t.jsxs("label",{className:ee.option,children:[t.jsx("input",{type:"radio",name:"reportReason",value:g.id,checked:l===g.id,onChange:w=>d(w.target.value),className:ee.radioInput}),t.jsx("span",{className:ee.radioCustom}),t.jsx("span",{className:ee.optionLabel,children:g.label})]},g.id))}),c&&t.jsx("div",{className:ee.errorMessage,children:c}),t.jsxs("div",{className:ee.buttons,children:[t.jsx("button",{onClick:m,className:ee.cancelButton,children:"Cancelar"}),t.jsx("button",{onClick:y,disabled:!l,className:ee.reportButton,children:"Reportar"})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:ee.successContainer,children:[t.jsx("div",{className:ee.thumbsUp,children:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:132,height:120,fill:"none",children:t.jsx("path",{fill:"#0073BE",d:"M119.249 42.357H81.915l5.621-27.039.177-1.893a8.906 8.906 0 0 0-2.603-6.272L78.838.941 39.907 39.93c-2.19 2.13-3.491 5.089-3.491 8.343v59.167c0 6.508 5.325 11.833 11.833 11.833h53.25c4.911 0 9.112-2.958 10.887-7.218l17.868-41.713c.533-1.36.829-2.78.829-4.32V54.192c0-6.509-5.325-11.834-11.834-11.834Zm0 23.667-17.75 41.417h-53.25V48.274l25.679-25.678L67.36 54.19h51.889v11.833ZM.916 48.274h23.667v71H.916v-71Z"})})}),t.jsx("p",{className:ee.successMessage,children:"¡Gracias por reportar!"})]}),t.jsx("div",{className:ee.buttons,children:t.jsx("button",{onClick:m,className:[ee.closeButton,ee.buttonAlone].join(" "),children:"Cerrar"})})]})]})})};async function _n({publication:e,path:n,size:a=5,sizereply:s=2,id:o,lastid:r,state:i="5,6",apiToken:l}){if(!e||!n)throw new Error("Missing required parameters: publication and path");if(typeof e!="string"||typeof n!="string")throw new Error("Invalid input types for publication or path");if(!l)throw new Error("Missing CMS API token");const d=parseInt(String(a),10),c=parseInt(String(s),10);if(isNaN(d)||d<=0)throw new Error("Invalid size parameter");if(isNaN(c)||c<0)throw new Error("Invalid sizereply parameter");const h=`${ka()}/hit/5.0/1/newcomments/get`,u=new URLSearchParams({publication:e,path:n,size:d.toString(),sizereply:c.toString(),state:i});o&&u.append("id",o),r&&u.append("lastid",r);const f=`${h}?${u.toString()}`;try{console.log("Fetching comments from:",f);const{data:y}=await V.get(f,{headers:{"x-api-token":l,"Cache-Control":"max-age=0, no-cache, no-store, must-revalidate",Pragma:"no-cache",Expires:"0"}});if(!y)throw new Error("No comments data received");return y.data||y||[]}catch(y){if(console.error("Error fetching comments:",y),V.isAxiosError(y)){const m=y.response?.status,g=y.response?.data;throw m===404?new Error("Comments not found"):m===403?new Error("Access forbidden - check API token"):m===401?new Error("Unauthorized - invalid API token"):m===500?new Error("Internal server error from CMS"):new Error(g?.error||g?.message||`HTTP ${m}: Failed to fetch comments`)}throw y}}const{PUBLIC_PUBLICATION_ID:ad}=Y(),sd=ad,od=e=>{const[n,a]=b.useState(void 0);return b.useEffect(()=>{if(n)return;(async()=>{const{PUBLIC_X_SECURITY_TOKEN:o}=Y();try{const r=await _n({publication:sd,path:e??"",size:5,sizereply:2,id:void 0,lastid:void 0,state:"5,6",apiToken:o});a(r[0]??[])}catch(r){console.error(r),a({comments:[],morecomment:!1})}})()},[n]),{comments:n,setComments:a}},Bo=({username:e,date:n})=>t.jsxs("div",{className:"comment-header",children:[t.jsx("span",{className:"comment-username",children:e}),t.jsx("span",{className:"comment-header-dot",children:"•"}),t.jsx("span",{className:"comment-date",children:Rc(ye(Number(n)))})]}),Lo=({user:e})=>t.jsx("div",{className:"comment-avatar",children:e.picture?t.jsx("img",{className:"comment-avatar-img",src:e.picture,alt:e.username}):e.firstname.charAt(0).toUpperCase()}),Do=({isReply:e=!1,onReply:n,onFlag:a})=>t.jsxs("div",{className:"comment-actions",children:[!e&&n&&t.jsx("button",{onClick:n,className:"comment-action-btn",children:t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",children:[t.jsx("g",{clipPath:"url(#a)",children:t.jsx("path",{fill:"#4D4E4E",d:"M9.976 9V5l-6.983 7 6.983 7v-4.1c4.988 0 8.48 1.6 10.973 5.1-.997-5-3.99-10-10.973-11Z"})}),t.jsx("defs",{children:t.jsx("clipPath",{id:"a",children:t.jsx("path",{fill:"#fff",d:"M0 0h23.942v24H0z"})})})]})}),t.jsx("button",{onClick:a,className:"comment-action-btn",children:t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:25,height:24,fill:"none",children:[t.jsx("g",{clipPath:"url(#a)",children:t.jsx("path",{fill:"#4D4E4E",d:"M20.133 2h-16c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2Zm0 14H5.303l-1.17 1.17V4h16v12Zm-9-11h2v6h-2V5Zm0 8h2v2h-2v-2Z"})}),t.jsx("defs",{children:t.jsx("clipPath",{id:"a",children:t.jsx("path",{fill:"#fff",d:"M.133 0h24v24h-24z"})})})]})})]}),Mo=({commentRef:e,captchaToken:n="",setIsDisabled:a})=>(b.useEffect(()=>{const s=e.current;if(!s)return;const o=()=>{const i=s.value.length;s.parentElement&&(s.parentElement.dataset.text=`${i}/${et}`),s.classList.toggle("over-limit",i>et),a(!ha(e,n).boolean)};return s.addEventListener("input",o),o(),()=>s.removeEventListener("input",o)},[e,n,a]),t.jsxs("div",{children:[t.jsx("label",{className:"comment-input-label",children:"Comentario"}),t.jsx("textarea",{ref:e,name:"comment",placeholder:"Ingresa un comentario",rows:2})]})),Po=({commentRef:e,captchaToken:n="",children:a})=>{const s=ha(e,n);return t.jsx("div",{className:"form-actions",children:t.jsxs("div",{className:"submit-zone",children:[a,!s.boolean&&t.jsx("p",{className:"submit-warning",children:s.text})]})})},Oo=({onClick:e,isDisabled:n})=>{const[a,s]=b.useState(!1);return b.useEffect(()=>{let o=null;return a&&(o=setTimeout(()=>{s(!1)},2400)),()=>{o&&clearTimeout(o)}},[a]),a?t.jsx("div",{className:"success-gif-container",children:t.jsx("img",{className:"success-gif",src:"/Success.gif"})}):t.jsxs("button",{type:"button",onClick:async o=>{await e(o)&&s(!0)},id:"comment-button",className:`submit-btn ${n?"disabled":"active"}`,children:["Enviar Comentario",t.jsx("svg",{style:{minWidth:16},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M1.39258 8.99997H12.5626L7.68258 13.88C7.29258 14.27 7.29258 14.91 7.68258 15.3C8.07258 15.69 8.70258 15.69 9.09258 15.3L15.6826 8.70997C16.0726 8.31997 16.0726 7.68997 15.6826 7.29997L9.10258 0.699971C8.71258 0.309971 8.08258 0.309971 7.69258 0.699971C7.30258 1.08997 7.30258 1.71997 7.69258 2.10997L12.5626 6.99997H1.39258C0.842578 6.99997 0.392578 7.44997 0.392578 7.99997C0.392578 8.54997 0.842578 8.99997 1.39258 8.99997Z",fill:"currentColor"})})]})},{PUBLIC_PUBLICATION_ID:rd}=Y(),id=rd,Qo=async({path:e,ref:n,captchaToken:a,button:s,user:o,id:r,addComment:i})=>{const l=n.current?.value||"";if(!ha(n,a).boolean||!o){const d=s.nextElementSibling;return d&&(d.style.display="block"),!1}try{const d=Date.now(),c=await fetch("/api/comments-add",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({publication:id,path:e,id:r,username:o.username,comment:l,recaptchaResponse:a})});let h=null;try{h=await c.json()}catch(m){console.error("Error parsing JSON response:",m)}if(!c.ok)throw new Error(`Error al enviar comentario: ${h?.message} status: ${c.status}`);const u=Date.now(),f=Math.max(0,2400+Math.abs(u-d)),y={username:o.username,firstname:o.firstname,...o.lastname&&{lastname:o.lastname},...o.picture&&{picture:o.picture}};return i({id:u.toString(),text:l,user:y,date:{time:Date.now()},reply:[]}),n.current&&(n.current.value=""),f}catch(d){return console.error("Error enviando comentario:",d),alert(d.message||"Error al enviar el comentario."),!1}},ld=({replyingTo:e,commentRef:n,user:a,path:s,addReply:o,closeForm:r})=>{const[i,l]=b.useState(!0),[d,c]=b.useState(""),h=()=>{n.current?.parentElement&&(n.current.parentElement.dataset.text=`0/${et}`),l(!0),r()};return t.jsxs("div",{className:"comment-form reply-form",children:[t.jsx("button",{className:"close-reply-form",onClick:h,children:t.jsx(ct,{})}),t.jsx(Mo,{commentRef:n,captchaToken:d,setIsDisabled:l}),t.jsx(Po,{commentRef:n,captchaToken:d,setCaptchaToken:c,children:t.jsx(Oo,{onClick:async u=>{if(i)return;const f=await Qo({path:s,ref:n,captchaToken:d,button:u.currentTarget,user:a,id:e,addComment:o});return f&&typeof f=="number"?(setTimeout(()=>{h()},f),!0):!1},isDisabled:i})})]})},cd=({reply:e,replyingTo:n,user:a,onFlag:s})=>{const o=e.text;let r=`${je.firstname} ${je.lastname}`,i=je.username;return e.user&&(r=`${e.user.firstname} ${e.user.lastname}`,i=e.user.username),t.jsx("div",{className:"comment-item reply",children:t.jsxs("div",{className:"comment-header-container",children:[t.jsx(Lo,{user:e.user?e.user:je}),t.jsxs("div",{style:{flex:1},children:[t.jsx(Bo,{username:r,date:e.date.time}),t.jsxs("div",{className:"comment-reply-to",children:["Respondiendo a ",t.jsx("strong",{children:n})]}),t.jsx("p",{className:"comment-text",children:o}),a?.username.toLowerCase()!==i.toLowerCase()&&t.jsx(Do,{isReply:!0,onFlag:()=>s(e.id)})]})]})})},dd=({comment:e,replyingTo:n,path:a,user:s,handleReplyingTo:o,onFlag:r})=>{const i={morereply:e.morereply??!1,reply:e.reply?e.reply:[]},[l,d]=b.useState(i),[c,h]=b.useState(!1),u=process.env.NEXT_PUBLIC_PUBLICATION_ID??"",f=e.text,y=b.useRef(null);let m=`${je.firstname} ${je.lastname}`,g=je.username;e.user&&(m=`${e.user.firstname} ${e.user.lastname}`,g=e.user.username);const w=v=>{d({morereply:l.morereply,reply:[v,...l.reply]})};return t.jsx("div",{className:"comment-item",children:t.jsxs("div",{className:"comment-header-container","data-hasreplies":l.reply.length>0?"true":"false",children:[t.jsx(Lo,{user:e.user?e.user:je}),t.jsxs("div",{style:{flex:1},children:[t.jsx(Bo,{username:m,date:e.date.time}),t.jsx("p",{className:"comment-text",children:f}),s?.username.toLowerCase()!==g.toLowerCase()&&t.jsx(Do,{onReply:()=>o(e.id),onFlag:()=>r(e.id)}),n===e.id&&s&&t.jsx(ld,{replyingTo:n,commentRef:y,addReply:w,user:s,path:a,closeForm:()=>o("")}),l.reply.length>0&&t.jsxs("div",{className:"comment-replies",children:[l.reply.map(v=>t.jsx(cd,{user:s,reply:v,replyingTo:m,onFlag:r},v.id)),c?t.jsx("div",{style:{marginLeft:"4rem",position:"relative"},children:t.jsx(Ge,{})}):l.morereply&&t.jsx("button",{className:"comment-replies-button reply-button",onClick:async()=>{const v=l.reply[l.reply.length-1]?.id;h(!0);try{const k=(await _n({publication:u,path:a??"",size:2,sizereply:2,id:e.id,lastid:v,state:"5,6",apiToken:process.env.NEXT_PUBLIC_X_SECURITY_TOKEN}))[0];h(!1),d({morereply:k.morecomment,reply:[...l.reply,...k.comments]})}catch(I){throw h(!1),new Error(`Error al obtener comentarios: ${I}`)}},children:"Más Respuestas"})]})]})]})})},hd=({commentRef:e,user:n,path:a,addComment:s})=>{const[o,r]=b.useState(!0),[i,l]=b.useState("");return t.jsxs("div",{className:"comment-form",children:[t.jsx(Mo,{commentRef:e,captchaToken:i,setIsDisabled:r}),t.jsx(Po,{commentRef:e,captchaToken:i,setCaptchaToken:l,children:t.jsx(Oo,{onClick:async d=>{if(o)return;const c=await Qo({path:a,ref:e,captchaToken:i,button:d.currentTarget,user:n,addComment:s});return c&&typeof c=="number"?(e.current?.parentElement&&(e.current.parentElement.dataset.text=`0/${et}`),r(!0),setTimeout(()=>{e.current?.parentElement&&(e.current.parentElement.dataset.text=`0/${et}`),r(!0)},c),!0):!1},isDisabled:o})})]})},{PUBLIC_PUBLICATION_ID:ud,PUBLIC_X_SECURITY_TOKEN:md}=Y(),jo=ud??"",fd=({isAuthenticated:e,path:n,user:a,handleLogout:s})=>{const o=n.replaceAll("/","|"),[r,i]=b.useState(void 0),[l,d]=b.useState(""),{comments:c,setComments:h}=od(o),[u,f]=b.useState(!1),y=b.useRef(null),m=S=>{d(l===S?"":S)},g=S=>{h(c?{...c,comments:[S,...c.comments??[]]}:void 0)},w=S=>{i(S)},v=async()=>{if(!c||!c.morecomment||c.comments.length===0)return;const S=c.comments[c.comments.length-1];if(!S)return;f(!0);const O=S.id;try{const $=(await _n({publication:jo,path:o??"",size:5,sizereply:2,id:void 0,lastid:O,state:"5,6",apiToken:md}))[0];h({morecomment:$.morecomment??!1,comments:[...c.comments,...$.comments]}),f(!1)}catch(M){throw f(!1),new Error(`Error al obtener comentarios: ${M}`)}},I=c?.comments&&c.comments.length>0,k=I?"Comparte tu opinión de este artículo.":"Se el primero en compartir tu opinión de este artículo.",D=t.jsx("div",{style:{display:"flex",width:"100%",justifyContent:"center"},children:t.jsx(Ge,{})});return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"comments-container",children:t.jsx(te,{title:I||e?"COMENTARIOS":!1,children:t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"comments-header",children:e&&a&&t.jsxs(t.Fragment,{children:[t.jsx(Jc,{user:a,handleLogout:s,message:k}),t.jsx(hd,{commentRef:y,user:a,addComment:g,path:o})]})}),t.jsx("div",{className:"comments-list","data-isauthenticated":`${e}`,children:c?c.comments&&c.comments.length>0?t.jsxs(t.Fragment,{children:[c.comments.map(S=>t.jsx(dd,{comment:S,replyingTo:l,handleReplyingTo:m,onFlag:w,user:a??je,path:o},S.id)),u&&D]}):null:D}),c?.morecomment&&!u&&t.jsx("button",{className:"comment-replies-button",onClick:v,children:"Más"})]})})}),t.jsx(nd,{username:a?.username??void 0,publication:jo,commentId:r,isOpen:r!==void 0,onClose:()=>i(void 0)})]})},ua=async(e,n)=>{if(!e)throw new Error("No action provided");if(!n)throw new Error("No site key provided");const a=window.grecaptcha;if(!a?.enterprise)throw new Error("grecaptcha not loaded");return new Promise((s,o)=>{a.enterprise.ready(async()=>{try{const r=await a.enterprise.execute(n,{action:e});if(!r)throw new Error("Captcha token no generado");s(r)}catch(r){o(r)}})})},Go={email:{label:"Email",required:!0},given_name:{label:"Nombre",required:!0},family_name:{label:"Apellido",required:!0},password:{label:"Contraseña",required:!0},confirmPassword:{label:"Confirmar contraseña",required:!0}},Nn=[{label:"La contraseña debe tener al menos 8 caracteres",test:e=>e.length>=8},{label:"Usa un número",test:e=>/\d/.test(e)},{label:"Usa una letra minúscula",test:e=>/[a-z]/.test(e)},{label:"Usa una letra mayúscula",test:e=>/[A-Z]/.test(e)},{label:"Usa un símbolo",test:e=>/[^A-Za-z0-9]/.test(e)}];function gd({goToLogin:e,handleGoogleLogin:n}){const[a,s]=b.useState({}),[o,r]=b.useState(!1),[i,l]=b.useState(!1),[d,c]=b.useState(null),[h,u]=b.useState("register"),f=(w,v)=>{s(I=>({...I,[w]:v}))},y=async w=>{w.preventDefault(),c(null),l(!0);try{const v=Object.keys(Go).filter(M=>!["username","password","confirmPassword"].includes(M)).map(M=>({Name:M,Value:a[M]}));if(v.some(M=>{if(!M.Value||M.Value.trim()==="")return!0}))return l(!1),c("Complete todos los campos");if(a.password!==a.confirmPassword){c("Las contraseñas no coinciden");return}const I=a.password||"";if(Nn.some(M=>!M.test(I))){c("La contraseña no es válida");return}const D=Math.floor(Date.now()/1e3);v.push({Name:"updated_at",Value:String(D)});const S=await ua("comment_register","");if(!S)throw new Error("Captcha token no generado");const O=await fetch("/api/auth/create-user",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:a.email,password:a.password,userAttributes:v,token:S})});if(!O.ok){const M=await O.json().catch(()=>({}));if(M.code==="UsernameExistsException"){await fetch("/api/auth/resend-code",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:a.email})}),u("confirm");return}throw new Error(M?.error||"Error al crear usuario")}u("confirm")}catch(v){console.log(v),c(v?.message||v?.error||"Error inesperado")}finally{l(!1)}},m=async w=>{if(w.preventDefault(),!a.confirmationCode){c("Debes ingresar el código de verificación");return}c(null),l(!0);try{const v=await fetch("/api/auth/confirm-user",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:a.email,code:a.confirmationCode})});if(!v.ok){const I=await v.json().catch(()=>({}));throw new Error(I?.error||"Error al confirmar usuario")}u("success")}catch(v){c(v?.message||"Error inesperado")}finally{l(!1)}},g=a.password||"";return t.jsxs(t.Fragment,{children:[h==="register"&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:n,className:_.google,children:[t.jsx("img",{src:"https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/google.svg",alt:"",className:_.googleIcon}),t.jsx("span",{children:"Continuar con Google"})]}),t.jsx("div",{className:_.divider,children:t.jsx("span",{children:"o"})}),t.jsxs("form",{onSubmit:y,className:_.form,"data-error":d?"true":"false",children:[t.jsx("ul",{className:_.formUl,children:Object.entries(Go).map(([w,{label:v}])=>t.jsxs("div",{className:_.field,children:[t.jsx("label",{className:_.label,children:v}),t.jsx("input",{type:w.toLowerCase().includes("password")?o?"text":"password":w==="birthdate"?"date":w==="email"?"email":w==="phone_number"?"tel":"text",name:w,value:a[w]||"",onChange:I=>f(w,I.target.value),className:_.input,placeholder:""}),w==="password"&&t.jsx("div",{className:_.passwordChecker,children:Nn.map((I,k)=>{const D=I.test(g);return t.jsxs("div",{className:D?_.valid:_.invalid,children:[t.jsx("div",{children:D?"✔":"○"}),t.jsx("div",{children:I.label})]},k)})}),w==="confirmPassword"&&t.jsxs("div",{className:_.checkboxRow,children:[t.jsx("input",{id:"showPasswordRegister",type:"checkbox",checked:o,onChange:I=>r(I.target.checked)}),t.jsx("label",{htmlFor:"showPasswordRegister",className:_.checkboxLabel,children:"Mostrar contraseñas"})]})]},w))}),d&&t.jsx("p",{className:_.error,children:d}),t.jsxs("p",{className:_.terms,children:["Al continuar, confirmo que he leído y aceptado los",t.jsx("a",{href:"/pages/politicas-de-privacidad.html",target:"_blank",children:"Términos y Condiciones"}),"de nuestra comunidad"]}),t.jsx("button",{type:"submit",className:_.primary,disabled:i,children:i?t.jsx(Ge,{}):"Crear cuenta"})]})]}),h==="confirm"&&t.jsxs("form",{onSubmit:m,className:_.form,"data-error":d?"true":"false",children:[t.jsxs("div",{className:_.field,children:[t.jsx("label",{className:_.label,children:"Código de verificación"}),t.jsx("input",{type:"text",name:"confirmationCode",value:a.confirmationCode||"",onChange:w=>f("confirmationCode",w.target.value),className:_.input,required:!0})]}),d&&t.jsx("p",{className:_.error,children:d}),t.jsx("button",{type:"submit",className:_.primary,disabled:i,children:i?t.jsx(Ge,{}):"Confirmar cuenta"}),t.jsxs("p",{className:_.switch,children:["¿Ya confirmaste antes?",t.jsx("button",{type:"button",onClick:e,children:"Iniciar sesión"})]})]}),h==="success"&&t.jsxs("form",{className:_.form,children:[t.jsxs("div",{className:_.successContainer,children:[t.jsx("div",{className:_.thumbsUp,children:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:132,height:120,fill:"none",children:t.jsx("path",{fill:"#0073BE",d:"M119.249 42.357H81.915l5.621-27.039.177-1.893a8.906 8.906 0 0 0-2.603-6.272L78.838.941 39.907 39.93c-2.19 2.13-3.491 5.089-3.491 8.343v59.167c0 6.508 5.325 11.833 11.833 11.833h53.25c4.911 0 9.112-2.958 10.887-7.218l17.868-41.713c.533-1.36.829-2.78.829-4.32V54.192c0-6.509-5.325-11.834-11.834-11.834Zm0 23.667-17.75 41.417h-53.25V48.274l25.679-25.678L67.36 54.19h51.889v11.833ZM.916 48.274h23.667v71H.916v-71Z"})})}),t.jsxs("div",{className:_.successMessage,children:[t.jsx("p",{children:"Confirmación completa."}),t.jsx("p",{children:"Ya eres parte de la comunidad!"})]})]}),t.jsx("button",{onClick:e,className:_.primary,children:"Iniciar sesión"})]}),h==="register"&&t.jsxs("p",{className:_.switch,children:["¿Ya tenés cuenta?",t.jsx("button",{type:"button",onClick:e,children:"Iniciar sesión"})]})]})}function pd({onClose:e,checkAuth:n,goToRegister:a,handleGoogleLogin:s}){const[o,r]=b.useState("login"),[i,l]=b.useState(""),[d,c]=b.useState(""),[h,u]=b.useState(""),[f,y]=b.useState(""),[m,g]=b.useState(""),[w,v]=b.useState(!1),[I,k]=b.useState(!1),[D,S]=b.useState(null),O=async z=>{if(!I){z.preventDefault(),S(null),k(!0);try{const P=await ua("comment_login",void 0);if(!P)throw new Error("Captcha token no generado");const x=await fetch("/api/auth/login-password",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({email:i,password:d,token:P})});if(!x.ok){const Z=await x.json().catch(()=>({}));throw new Error(Z?.error||"Ha ocurrido un error")}e(),await n()}catch(P){S(P?.message||"Error inesperado")}finally{k(!1)}}},M=async z=>{if(!I){z.preventDefault(),S(null),k(!0);try{const P=await fetch("/api/auth/forgot-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:i})});if(!P.ok){const x=await P.json().catch(()=>({}));throw new Error(x?.error||"Error al enviar código")}c(""),r("changePassword")}catch(P){S(P?.message||"Error inesperado")}finally{k(!1)}}},$=async z=>{if(I)return;if(z.preventDefault(),f!==m){S("Las contraseñas no coinciden");return}if(Nn.some(x=>!x.test(f))){S("La contraseña no cumple con los requisitos");return}S(null),k(!0);try{const x=await fetch("/api/auth/confirm-forgot-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:i,code:h,newPassword:f})});if(!x.ok){const Z=await x.json().catch(()=>({}));throw new Error(Z?.error||"Error al cambiar contraseña")}r("feedback")}catch(x){S(x?.message||"Error inesperado")}finally{k(!1)}};return t.jsxs(t.Fragment,{children:[o==="login"&&t.jsx(Ad,{email:i,password:d,showPassword:w,loading:I,error:D,setEmail:l,setPassword:c,setShowPassword:v,onSubmit:O,onForgot:()=>{S(null),r("forgot")},onRegister:a,handleGoogleLogin:s}),o==="forgot"&&t.jsx(wd,{email:i,setEmail:l,loading:I,error:D,onSubmit:M,onBack:()=>{S(null),r("login")}}),o==="changePassword"&&t.jsx(yd,{email:i,confirmationCode:h,newPassword:f,confirmNewPassword:m,showPassword:w,loading:I,error:D,setConfirmationCode:u,setNewPassword:y,setConfirmNewPassword:g,setShowPassword:v,onSubmit:$,onBack:()=>{S(null),r("forgot")}}),o==="feedback"&&t.jsx(bd,{onBackToLogin:()=>{S(null),r("login")}})]})}function Ad({email:e,password:n,showPassword:a,loading:s,error:o,setEmail:r,setPassword:i,setShowPassword:l,onSubmit:d,onForgot:c,onRegister:h,handleGoogleLogin:u}){return t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:u,className:_.google,children:[t.jsx("img",{src:"https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/google.svg",alt:"",className:_.googleIcon}),t.jsx("span",{children:"Continuar con Google"})]}),t.jsx("div",{className:_.divider,children:t.jsx("span",{children:"o"})}),t.jsxs("form",{onSubmit:d,className:_.form,"data-error":o?"true":"false",children:[t.jsxs("div",{className:_.field,children:[t.jsx("label",{className:_.label,children:"Email"}),t.jsx("input",{type:"email",value:e,onChange:f=>r(f.target.value),className:_.input,placeholder:""})]}),t.jsxs("div",{className:_.field,children:[t.jsx("label",{className:_.label,children:"Contraseña"}),t.jsx("input",{type:a?"text":"password",value:n,onChange:f=>i(f.target.value),className:_.input,placeholder:""}),t.jsxs("div",{className:_.checkboxRow,children:[t.jsx("input",{id:"showPasswordLogin",type:"checkbox",checked:a,onChange:f=>l(f.target.checked)}),t.jsx("label",{htmlFor:"showPasswordLogin",className:_.checkboxLabel,children:"Mostrar contraseña"})]})]}),o&&t.jsx("p",{className:_.error,children:o}),t.jsx("button",{type:"submit",className:_.primary,disabled:s,children:s?t.jsx(Ge,{}):"Iniciar Sesión"})]}),t.jsxs("p",{className:_.switch,children:["¿No tenés cuenta?",t.jsx("button",{type:"button",onClick:h,children:"Registrate"})]}),t.jsx("button",{type:"button",className:_.forgotPassword,onClick:c,children:"Olvidé mi contraseña"})]})}function wd({email:e,setEmail:n,loading:a,error:s,onSubmit:o,onBack:r}){return t.jsxs("form",{onSubmit:o,className:_.form,"data-error":s?"true":"false",children:[t.jsx("p",{className:_.message,children:"Ingrese su dirección de correo electrónico. Le enviaremos un mensaje con un código para restablecer la contraseña."}),t.jsxs("div",{className:_.field,children:[t.jsx("label",{className:_.label,children:"Email"}),t.jsx("input",{type:"email",value:e,name:"email",onChange:i=>n(i.target.value),className:_.input,placeholder:""})]}),s&&t.jsx("p",{className:_.error,children:s}),t.jsx("button",{type:"submit",className:_.primary,disabled:a,children:a?t.jsx(Ge,{}):"Enviar código"}),t.jsx("p",{className:_.switch,children:t.jsx("button",{type:"button",onClick:r,children:"Volver"})})]})}function yd({email:e,confirmationCode:n,newPassword:a,confirmNewPassword:s,showPassword:o,loading:r,error:i,setConfirmationCode:l,setNewPassword:d,setConfirmNewPassword:c,setShowPassword:h,onSubmit:u,onBack:f}){return t.jsxs("form",{onSubmit:u,className:_.form,"data-error":i?"true":"false",children:[t.jsxs("p",{className:_.message,children:["Hemos enviado un código de restablecimiento de contraseña en un mensaje de Correo electrónico a ",td(e),". Ingrese el código y la contraseña nueva."]}),t.jsxs("ul",{className:_.formUl,children:[t.jsxs("div",{className:_.field,children:[t.jsx("label",{className:_.label,children:"Código de verificación"}),t.jsx("input",{type:"text",value:n,onChange:y=>l(y.target.value),className:_.input,placeholder:""})]}),t.jsxs("div",{className:_.field,children:[t.jsx("label",{className:_.label,children:"Nueva contraseña"}),t.jsx("input",{type:o?"text":"password",value:a,onChange:y=>d(y.target.value),className:_.input,placeholder:"",name:"password"}),t.jsx("div",{className:_.passwordChecker,children:Nn.map((y,m)=>{const g=y.test(a);return t.jsxs("div",{className:g?_.valid:_.invalid,children:[t.jsx("div",{children:g?"✔":"○"}),t.jsx("div",{children:y.label})]},m)})})]}),t.jsxs("div",{className:_.field,children:[t.jsx("label",{className:_.label,children:"Confirmar contraseña"}),t.jsx("input",{type:o?"text":"password",value:s,onChange:y=>c(y.target.value),className:_.input,placeholder:""}),t.jsxs("div",{className:_.checkboxRow,children:[t.jsx("input",{id:"showPasswordForgot",type:"checkbox",checked:o,onChange:y=>h(y.target.checked)}),t.jsx("label",{htmlFor:"showPasswordForgot",className:_.checkboxLabel,children:"Mostrar contraseñas"})]})]})]}),i&&t.jsx("p",{className:_.error,children:i}),t.jsx("button",{type:"submit",className:_.primary,style:{maxWidth:r?"revert-layer":"fit-content"},disabled:r,children:r?t.jsx(Ge,{}):"Cambiar contraseña"}),t.jsx("p",{className:_.switch,children:t.jsx("button",{type:"button",onClick:f,children:"Volver"})})]})}function bd({onBackToLogin:e}){return t.jsxs("div",{className:_.form,children:[t.jsx("p",{className:_.success,children:"La contraseña fue cambiada con éxito"}),t.jsx("button",{type:"button",className:_.primary,onClick:e,children:"Iniciar Sesión"})]})}function Cd({loginUrl:e,onClose:n,checkAuth:a,icon:s}){const[o,r]=b.useState("login"),i=async()=>{if(!e)return;const l=encodeURIComponent(window.location.pathname);window.location.href=`/api/auth/login?redirect=${l}`};return t.jsx("div",{className:_.overlay,role:"dialog","aria-modal":"true",id:"pop-overlay",onClick:l=>{const d=l.target;d&&d.id==="pop-overlay"&&n()},children:t.jsxs("div",{className:_.card,children:[t.jsxs("header",{className:_.header,children:[t.jsx("div",{className:_.logo,children:s?s():null}),t.jsx("button",{onClick:n,className:_.close,"aria-label":"Cerrar",children:t.jsx(ct,{})})]}),o==="login"&&t.jsx(pd,{onClose:n,checkAuth:a,handleGoogleLogin:i,goToRegister:()=>r("register")}),o==="register"&&t.jsx(gd,{handleGoogleLogin:i,goToLogin:()=>r("login")})]})})}function vd({isAuthenticated:e,setIsAuthenticated:n,loginUrl:a,user:s,path:o,checkAuth:r,icon:i}){const[l,d]=b.useState(!1),c=async()=>{{const u=window.location.pathname;window.location.href=`${window.location.origin}/api/auth/logout?redirect=${encodeURIComponent(u)}`}},h=async u=>{u.preventDefault(),a&&d(!0)};return t.jsxs(t.Fragment,{children:[l&&t.jsx(Cd,{loginUrl:a,icon:i,checkAuth:r,onClose:()=>{d(!1)}}),!e&&t.jsxs("div",{className:"auth-container",children:[t.jsx("p",{children:"Sumate a la comunidad para dejar tu comentario"}),t.jsx("a",{href:a,onClick:h,className:"login-button",children:"Iniciar Sesión"})]}),t.jsx(fd,{isAuthenticated:e,handleLogout:c,path:o,user:e?s:void 0})]})}function _d({isVisible:e,path:n,icon:a}){const[s,o]=b.useState(null),[r,i]=b.useState(null),l=async()=>{if(e){if(document.cookie.search("undefinedIS_AUTH=true")===-1){o(!1),i(null),console.log("user not logged");return}try{const u=await(await fetch("/api/auth/user",{credentials:"include"})).json();o(u.isAuthenticated??!1),i(u.user??null)}catch(h){console.error("Error checking auth:",h),o(!1),i(null)}}};b.useEffect(()=>{l()},[e]),b.useEffect(()=>{if(!r||!e||typeof window>"u")return;const h=window;if(typeof h!="function"){console.warn("gtag no está disponible todavía");return}h.gtag("set",{user_id:r.username}),console.log("username setted successfully")},[r,e]);const d="/api/auth/login",c=t.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:310,position:"relative"},children:t.jsx(Ge,{})});return s===null?c:e?t.jsx(vd,{icon:a,isAuthenticated:s,setIsAuthenticated:o,loginUrl:d,user:r??void 0,checkAuth:l,path:n}):c}const Nd=({render:e,internalPath:n,section:a,currentNews:s,stylesConfig:o,icon:r})=>{const i=b.useRef(null),[l,d]=b.useState(!0);b.useEffect(()=>{const h=new IntersectionObserver(([u])=>{u?.isIntersecting&&(d(!0),h.disconnect())},{rootMargin:"0px",threshold:.1});return i.current&&h.observe(i.current),()=>h.disconnect()},[]);const c={comment:t.jsx(_d,{path:n,icon:r,isVisible:l}),more:t.jsx(Wc,{section:a,currentNews:s,stylesConfig:o,isVisible:l})};return t.jsx("div",{ref:i,suppressHydrationWarning:!0,style:{...o?o["Modulo 1x3 Client"]?o["Modulo 1x3 Client"]:o["Modulo 1x3"]:{}},children:c[e]})};async function Sd({publication:e,path:n,username:a,comment:s,id:o,recaptchaResponse:r,baseUrl:i,apiToken:l,securityToken:d}){if(console.log("Adding comment with data:",{publication:e,path:n,username:a,comment:s,id:o,recaptchaResponse:r}),!e||!n||!s||!a)return{type:"error",message:"Faltan campos obligatorios. Por favor, completa todos los campos.",status:400};if([e,n,s,a].some(y=>typeof y!="string"))return{type:"error",message:"Datos inválidos. Intenta de nuevo.",status:400};if(!a.trim())return{type:"error",message:"El nombre no puede estar vacío.",status:400};if(!s.trim())return{type:"error",message:"El comentario no puede estar vacío.",status:400};const c=await xo(r);if(console.log("Verifying captcha token...",c),!c)return{type:"error",message:"Captcha inválido. Intenta nuevamente.",status:403};const h=`${i}/system/modules/com.tfsla.diario.base/templates/hit/5.0/1/newcomments/add`,u={publication:e,path:n.replace(/\|/gi,"/"),username:a??!1,text:s.trim()};o&&(u.id=o);const f=new URLSearchParams(u);try{const{data:y}=await V.get(`${h}?${f.toString()}`,{headers:{"Content-Type":"application/json","x-security-token":d,"x-api-token":l,"User-Agent":"amplifyapp-comments-saas"}});return!y||y.error?(console.error("CMS error response:",y),{type:"error",message:"No se pudo guardar el comentario. Intenta nuevamente en unos minutos.",status:502}):(console.log("Comentario enviado con éxito",y),{type:"success",message:"Comentario enviado con éxito.",status:200})}catch(y){if(console.error("Error enviando comentario:",y),V.isAxiosError(y)){const m=y.response?.status??500,g=y.response?.data;return m===400?{type:"error",message:g?.message||"Solicitud inválida. Verifica que los campos sean correctos.",status:400}:m===403?{type:"error",message:"Captcha inválido o acceso prohibido.",status:403}:m===500?{type:"error",message:"Error interno del servidor del CMS.",status:500}:{type:"error",message:g?.message||"No se pudo enviar el comentario.",status:m}}return{type:"error",message:"Error inesperado. Intenta nuevamente.",status:500}}}const kd=async({token:e,projectId:n,captchaKey:a,apiKey:s,captchaAction:o})=>{if(!e)throw new Error("No token provided");if(!n||!a||!s)throw new Error("Missing project ID or site key");if(!o)throw new Error("No action provided");try{const i=await(await fetch(`https://recaptchaenterprise.googleapis.com/v1/projects/${n}/assessments?key=${s}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event:{token:e,siteKey:a,expectedAction:o}})})).json();if(!i?.tokenProperties?.valid)throw new Error(`The token was: ${i?.tokenProperties?.invalidReason}`);if(i.tokenProperties.action!==o)throw new Error("The action attribute in your reCAPTCHA tag does not match the action you are expecting to score");return i?.riskAnalysis?.score??0}catch(r){throw console.error("Recaptcha verification failed",r),new Error(String(r))}};p.AssetsPreconnect=qa,p.AutorComponent=Qc,p.AutorHeader1=Js,p.AutorHeader2=Zs,p.BannerAdvertising=ae,p.BannerAdvertisingMiddle=Te,p.CarrouselCSR=Zi,p.CarrouselIRS=Ze,p.CarruselCard=Ao,p.CarruselOpinion=wo,p.CommonServices=fe,p.Comscore=ma,p.ContactInfoServer=Wl,p.ContactInput=kl,p.ContactSelect=El,p.ContactTextarea=Il,p.ContentLayout1=rt,p.ContentLayoutTema=Yn,p.DEBUG_MainSlots=xc,p.DestacadoNoticias=io,p.DestacadoVideos=fo,p.DynamicBlockServices=xs,p.DynamicComponents=Tc,p.DynamicMainSlot=Cn,p.DynamicSlot=ca,p.EditorialBlock=Gl,p.ErrorComponent=Sl,p.Font=za,p.Footer=Al,p.FormatAfterScripts=xa,p.FormatScripts=Un,p.GA4=fa,p.GTM=ga,p.GalleryHeader=ia,p.GenerateBody=Fi,p.GenerateHead=Vi,p.Header=Ml,p.ImageOffline=Os,p.IssuuServices=Gi,p.ItemListSchema=Pa,p.JournalistArticule2=no,p.JournalistGroup=ao,p.LayoutNewsComponent=Jn,p.LazyLoader=Nd,p.LiveBlogHeader=Ys,p.Location=Ki,p.MainComponentServices=Ar,p.Marfeel=pa,p.MiddleSection=$e,p.Modulo1x3=na,p.Modulo1x3Card=po,p.Modulo1x4=uo,p.Modulo1x5=mo,p.Modulo2Columnas=$l,p.Modulo3Columnas=co,p.ModuloNewsletter=zl,p.ModuloOpinion=jl,p.NewListResponseDataPH=Uo,p.NewsArticle=Qa,p.NewsComponent=Bc,p.NewsContent=un,p.NextPrev=Et,p.OrgList=ja,p.PreloadImages=xn,p.REPORT_REASONS=Ue,p.Readest=rn,p.ScriptHydrator=Hc,p.SearchSection=Oc,p.Section=te,p.SectionCard=Ee,p.SectionCard2=Ut,p.SectionCardServerComponent=wn,p.SectionServerComponent=Fl,p.ShowSection=Ls,p.SocialNetworks=sc,p.SpeculationRules=Ma,p.StaticSlotWrapper=Uc,p.SubscribeColumn=$s,p.SubscribeRow=zs,p.SubscribeWhatsAppColumn=cl,p.TagComponent=Mc,p.TagSection=to,p.TimeLine=Ks,p.TrimPathname=dr,p.VideoBlock3=Nl,p.VideoBlock4=Tl,p.VideoSection=zc,p.VideosSchemas=$a,p.WebsiteList=Ga,p.addComment=Sd,p.bannersReplace=Wt,p.becomeVideoObject=nt,p.buildTagUrl=qn,p.coloringByStrokeSVGs=Hs,p.compileStyleProps=bn,p.cutString=be,p.extractRealtedNews=lr,p.formatDate=ye,p.formatDateEdiciones=ir,p.formatDateJournalistArticule=En,p.formatDateTimeline=_a,p.formatNewsMeta=Ea,p.formatVideoData=Ba,p.generalGetData=Hi,p.getCaptchaToken=ua,p.getComments=_n,p.getConfig=Y,p.getDynamicSlots=$i,p.getEnvironmentUrl=At,p.getEnvironmentUrlFront=ka,p.getImageUrl=ne,p.getNextMeta=wt,p.getPage=bt,p.getPreloadImages=pr,p.getPrevMeta=yt,p.getReportReasonLabel=Xc,p.getResponse=Na,p.getResponsePromise=Sa,p.getSchemas=Yt,p.getScriptReplaces=Bn,p.getSlugs=Va,p.getTypeOfNews=ur,p.getVideoRealPath=mr,p.initLibrary=rr,p.metadataToJSX=Ta,p.metadata_defaults=qs,p.parseTags=In,p.pathnameSplit=Ia,p.removePages=Ha,p.reportComment=Zc,p.shareButtons=Vs,p.socialIcons=cn,p.speculationRules=Da,p.speculationRulesHome=La,p.urlReplaces=Ua,p.verifyCaptchaTokenEnterprise=kd,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sass-template-common",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"