PageSourceSearch

https://cacttus.cl/_next/static/chunks/pages/blog-b691483107515c4b.js

js cacttus.cl collected 2026-10-01 23:54:53 UTC 8,689 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},a=(new e.Error).stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="dc4d3883-720a-4344-8330-355ffdf1aefc",e._sentryDebugIdIdentifier="sentry-dbid-dc4d3883-720a-4344-8330-355ffdf1aefc")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9195],{64359:function(e,a,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/blog",function(){return t(86306)}])},76671:function(e,a,t){"use strict";var r=t(52322),s=t(2784),l=t(39097),o=t.n(l);a.Z=e=>{let{currentPage:a,totalPages:t,onPageChange:l,isLoading:n=!1,basePath:d="/blog"}=e,getPageHref=e=>1===e?d:"".concat(d,"?page=").concat(e);if(t<=1)return null;let i=(()=>{let e=[],r=[];for(let r=Math.max(2,a-2);r<=Math.min(t-1,a+2);r++)e.push(r);return a-2>2?r.push(1,"..."):r.push(1),r.push(...e),a+2<t-1?r.push("...",t):t>1&&r.push(t),r})(),handleClick=(e,a)=>{e.preventDefault(),n||l(a)};return(0,r.jsxs)("nav",{className:"flex items-center justify-center gap-2 mt-12","aria-label":"Paginaci\xf3n del blog",children:[1===a?(0,r.jsx)("span",{className:"px-3 py-2 text-sm font-medium text-gray-300 bg-white border border-gray-200 rounded-md cursor-not-allowed",children:"Anterior"}):(0,r.jsx)(o(),{href:getPageHref(a-1),onClick:e=>handleClick(e,a-1),className:"px-3 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-md hover:bg-gray-50",children:"Anterior"}),i.map((e,t)=>(0,r.jsx)(s.Fragment,{children:"..."===e?(0,r.jsx)("span",{className:"px-3 py-2 text-sm text-gray-500",children:"..."}):(0,r.jsx)(o(),{href:getPageHref(e),onClick:a=>handleClick(a,e),className:"px-3 py-2 text-sm font-medium rounded-md ".concat(a===e?"bg-blue-600 text-white pointer-events-none":"text-gray-500 bg-white border border-gray-300 hover:bg-gray-50"),"aria-current":a===e?"page":void 0,children:e})},t)),a===t?(0,r.jsx)("span",{className:"px-3 py-2 text-sm font-medium text-gray-300 bg-white border border-gray-200 rounded-md cursor-not-allowed",children:"Siguiente"}):(0,r.jsx)(o(),{href:getPageHref(a+1),onClick:e=>handleClick(e,a+1),className:"px-3 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-md hover:bg-gray-50",children:"Siguiente"})]})}},86306:function(e,a,t){"use strict";t.r(a),t.d(a,{__N_SSP:function(){return w},default:function(){return BlogCoverPage}});var r=t(52322),s=t(2784),l=t(39097),o=t.n(l),n=t(5632),d=t(69503),i=t(45447),c=t(93829),blog_BlogHero=e=>{let{title:a,subtitle:t,backgroundImage:l}=e,[o,n]=(0,s.useState)(""),[d,u]=(0,s.useState)(!1);return(0,r.jsx)("section",{className:"relative bg-white py-6 sm:py-8 overflow-hidden min-h-[85vh] flex flex-col justify-center",style:l?{backgroundImage:"url(".concat(l,")"),backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"bottom right"}:{},children:(0,r.jsxs)("div",{className:"relative z-10 max-w-2xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col items-center justify-center pt-8 sm:pt-12 min-h-[75vh]",children:[(0,r.jsx)("h1",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-gray-900 leading-tight text-center mb-4",children:a}),(0,r.jsx)("p",{className:"text-base sm:text-lg text-gray-600 text-center mb-8 max-w-xl leading-relaxed",children:t}),(0,r.jsx)("div",{className:"w-full max-w-md flex flex-col items-center",children:d?(0,r.jsx)("div",{className:"w-full text-center py-4 text-green-600 font-semibold",children:"\xa1Gracias por registrarte!"}):(0,r.jsxs)("form",{className:"w-full flex bg-white border border-gray-200 rounded-lg shadow-md overflow-hidden",onSubmit:e=>{e.preventDefault(),u(!0)},children:[(0,r.jsx)(i.Z,{placeholder:"Ingresa tu correo",inputProps:{type:"email",value:o,onChange:e=>n(e.target.value),required:!0},className:"flex-1",inputClassName:"border-0 shadow-none bg-transparent"}),(0,r.jsx)(c.z,{type:"submit",variant:"brand",size:"small",className:"rounded-none rounded-r-lg px-6",children:"Registrarme"})]})})]})})},u=t(27117),g=t(48583),x=t(76671);function BlogPostPlaceholder(){return(0,r.jsxs)("div",{className:"bg-white rounded-lg shadow-md overflow-hidden animate-pulse",children:[(0,r.jsx)("div",{className:"w-full h-48 bg-gray-200"}),(0,r.jsxs)("div",{className:"p-6",children:[(0,r.jsx)("div",{className:"w-20 h-6 bg-gray-200 rounded-full mb-3"}),(0,r.jsx)("div",{className:"w-3/4 h-6 bg-gray-200 rounded mb-3"}),(0,r.jsx)("div",{className:"w-1/2 h-6 bg-gray-200 rounded mb-4"}),(0,r.jsx)("div",{className:"w-full h-4 bg-gray-200 rounded mb-2"}),(0,r.jsx)("div",{className:"w-5/6 h-4 bg-gray-200 rounded mb-2"}),(0,r.jsx)("div",{className:"w-4/6 h-4 bg-gray-200 rounded mb-4"}),(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("div",{className:"w-10 h-10 bg-gray-200 rounded-full mr-3"}),(0,r.jsx)("div",{className:"w-24 h-4 bg-gray-200 rounded"})]})]})]})}
1function BlogPostPlaceholders(e){let{count:a}=e;return(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:Array.from({length:a},(e,a)=>(0,r.jsx)(BlogPostPlaceholder,{},a))})}var m=t(7040),h=t(44994),b=t(53538);let p=b.Ry({id:b.Rx(),category:b.Z_(),slug:b.Z_().nullish()});p.extend({post_count:b.Rx(),is_indexable:b.O7()});let f=b.Ry({id:b.Rx(),title:b.Z_(),path:b.Z_(),intro:b.Z_(),publish_date:b.Z_(),reading_time:b.Rx(),status:b.Rx(),category:p,author_name:b.Z_(),header_photo:b.Z_().nullable()});f.extend({text:b.Z_(),header_photo:b.Z_().nullable(),meta_title:b.Z_().nullable(),meta_description:b.Z_().nullable(),meta_keywords:b.Z_().nullable(),updated_at:b.Z_().optional()});var y=t(11168),v=t(13346);async function getBlogPosts(e,a,t){let r=await (0,h.h)(b.Ry({count:b.Rx(),next:b.Z_().nullable(),previous:b.Z_().nullable(),results:f.array()}),{method:"GET",url:v.Z.blog.v2.posts({page:e,page_size:a,category:t})});return r.data}let j={all:["blog"],posts:(e,a)=>[...j.all,"posts",{page:e,pageSize:a}],featured:()=>[...j.all,"featured"],detail:e=>[...j.all,"post",e]};var w=!0;function BlogCoverPage(e){let{categories:a}=e,t=(0,n.useRouter)(),l=Number(t.query.page)||1,i=l>0?l:1,c=(0,s.useRef)(null),{data:h,isLoading:b,error:p}=(0,m.a)({queryKey:j.posts(i,12),queryFn:()=>getBlogPosts(i,12),retry:!1,refetchOnWindowFocus:!1});if((0,s.useEffect)(()=>{(()=>{if(i>1&&c.current&&!b){let e=c.current.offsetTop;window.scrollTo({top:e-100,behavior:"smooth"})}})()},[i,b]),p)return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(blog_BlogHero,{title:"Entendiendo el seguro de mascotas \uD83D\uDC3E",subtitle:"Un blog lleno de amor y sabidur\xeda para que conozcas m\xe1s sobre c\xf3mo cuidar a tus peludos.",backgroundImage:"/static/images/landing/hero/landing_hero.svg"}),(0,r.jsx)("main",{className:"max-w-5xl mx-auto px-4 py-12",children:(0,r.jsx)("div",{className:"text-center py-12",children:(0,r.jsx)("p",{className:"text-red-500",children:"Error al cargar los art\xedculos. Por favor, intenta nuevamente."})})}),(0,r.jsx)(u.Z,{})]});let f=(null==h?void 0:h.results)||[],v=h?Math.ceil(h.count/12):0,w=f.map(g.c),_=i>1?"Blog sobre mascotas | P\xe1gina ".concat(i," | Cacttus"):"Blog sobre mascotas | Cacttus",N=i>1?"".concat(y._O,"/blog?page=").concat(i):void 0;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.R,{title:_,canonicalUrl:N,description:"Consejos, gu\xedas y art\xedculos sobre el cuidado de perros y gatos. Aprende a cuidar mejor a tu mascota con nuestro blog.",keywords:"blog mascotas, cuidado perros, cuidado gatos, consejos veterinarios, cacttus"}),(0,r.jsx)(blog_BlogHero,{title:"Entendiendo el seguro de mascotas \uD83D\uDC3E",subtitle:"Un blog lleno de amor y sabidur\xeda para que conozcas m\xe1s sobre c\xf3mo cuidar a tus peludos.",backgroundImage:"/static/images/landing/hero/landing_hero.svg"}),(0,r.jsxs)("main",{ref:c,className:"max-w-5xl mx-auto px-4 pt-12 pb-16",children:[a.length>0&&(0,r.jsx)("nav",{className:"mb-10","aria-label":"Categor\xedas del blog",children:(0,r.jsx)("div",{className:"flex flex-wrap justify-center gap-2",children:a.map(e=>e.slug&&(0,r.jsx)(o(),{href:{pathname:"/blog/categoria/[slug]",query:{slug:e.slug}},className:"px-4 py-1.5 text-sm font-medium text-blue-600 bg-blue-50 rounded-full hover:bg-blue-100 transition-colors",children:e.category},e.id))})}),(0,r.jsx)("h2",{className:"text-2xl font-bold mb-8 text-center",children:"\xdaltimos art\xedculos"}),b?(0,r.jsx)(BlogPostPlaceholders,{count:12}):(0,r.jsx)(g.Z,{posts:w}),(0,r.jsx)(x.Z,{currentPage:i,totalPages:v,onPageChange:e=>{let a=1===e?"/blog":"/blog?page=".concat(e);t.push(a,void 0,{shallow:!0})},isLoading:!1})]}),(0,r.jsx)(u.Z,{})]})}}},function(e){e.O(0,[6630,9774,2888,179],function(){return e(e.s=64359)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.