3l124k

Onde comer e beber 4t653h Jornal da Paraiba
Local do evento

${f}

`);let t;t=n.dataFinal!=null&&n.data!=n.dataFinal?n.data+" a "+n.dataFinal:n.data;t&&(u=`

Data do evento

${t}

`);n.price!==null&&(e=n.price==0?'

Valor mínimo<\/i> Valor médio<\/i> Valor máximo<\/i><\/div>':n.price==1?'
Valor mínimo<\/i> Valor médio<\/i> Valor máximo<\/i><\/div>':n.price==2?'
Valor mínimo<\/i> Valor médio<\/i> Valor máximo<\/i><\/div>':'
Valor mínimo<\/i> Valor médio<\/i> Valor máximo<\/i><\/div>');r+=`
${n.title}

Guia Qual a Boa? 3l6e4l

${n.title} 365i4k

${i} ${u}
${n.Table.tableColumns.Ingresso.values["0"][0].value}
`}});document.querySelector(".jpb-BoxHorizontalAgenda:last-of-type").insertAdjacentHTML("afterend",r);offsetBoa+=t.length;document.querySelector("#jpb-loore-category").remove();document.querySelector(".jpb-BoxHorizontalAgenda:last-of-type").insertAdjacentElement("afterend",i);t.length===0&&(i.textContent="Não há mais eventos",i.disabled=!0)}function mountDates(n){function r(){let t=[],n=new Date,i=n.getMonth(),r=n.getDate();for(let u=0;u<5;u++){let f=new Date(n);if(f.setDate(r+u+1),f.getMonth()!=i)break;f.setUTCHours(3,0,0,0);let e=f.toISOString();t.push(e)}return t}function u(n){let t=new Date(n),i=String(t.getDate()).padStart(2,"0"),r=new Intl.DateTimeFormat("pt-BR",{month:"short"}).format(t);return{day:i,month:r}}if(n!=null){let t=document.getElementById("datas"),i=[];t.innerHTML="";function r(n,r){let u=new Date(n),f=new Date(n);while(u<=r){let e={month:"short"},n=String(u.getDate()).padStart(2,"0"),r=new Intl.DateTimeFormat("pt-BR",e).format(u),o=new Intl.DateTimeFormat("pt-BR",e).format(f),s=`-`;console.log(r);console.log(o);i.includes(n)||r==o&&(t.innerHTML+=`
${n}

${r}

`,i.push(n));u.setDate(u.getDate()+1)}}n.sort((n,t)=>new Date(n.dataFormated)-new Date(t.dataFormated));n.forEach(n=>{let t=new Date(n.dataFormated),i=n.Fim?new Date(n.Fim):t;r(t,i)})}else{let n=document.getElementById("datas"),t=[],i=r();i.forEach(i=>{let{day:r,month:f}=u(i);n.innerHTML+=`
${r}

${f}

`;t.push(r)})}let t=document.querySelectorAll(".agenda-date"),i=document.querySelector("#agendaSection");t.forEach(function(r){r.addEventListener("click",function(){if(this.classList.contains("active"))t.forEach(function(n){n.classList.remove("active")}),i.innerHTML="";else{t.forEach(function(n){n.classList.remove("active")});this.classList.add("active");function u(n,t,i){return n>=t&&n<=i}let r=new Date(this.getAttribute("data-eventdate")),e=String(r.getDate()).padStart(2,"0"),o=String(r.getMonth()+1).padStart(2,"0"),f;i.innerHTML="";f=n!=null?n.filter(function(n){let t=new Date(n.dataFormated),i=n.Fim?new Date(n.Fim):t;return t.setHours(0,0,0,0),i.setHours(0,0,0,0),r.setHours(0,0,0,0),u(r,t,i)}):jsonDataEvents.filter(function(n){let t=new Date(n.dataFormated),i=n.Fim?new Date(n.Fim):t;return t.setHours(0,0,0,0),i.setHours(0,0,0,0),r.setHours(0,0,0,0),u(r,t,i)});f.forEach(n=>{let u=new Date(n.dataFormated),t="",r="";n.Fim!=null&&n.Fim!=n.dataFormated&&(t=" a "+new Date(n.Fim).toLocaleDateString("pt-BR"));n.Valor!=null&&(r=n.Valor);i.innerHTML+=`
Desejo de Menina, Mara Pavanelly e Banda Encantus em Campina Grande

${n.category} 3d5t1l

${n.title} 365i4k

Local do evento

${n.local}

Data do evento

${u.toLocaleDateString("pt-BR")} ${t}

${r}
`})}})})}function mountChamadaBox(){let n=document.querySelectorAll(".jpb-chamadaBoxBoa");jsonDataEvents.forEach((t,i)=>{let r=document.querySelectorAll(".jpb-chamadaBoxBoa").length;if(i{if(!(i<4)){let r=i-4,u=document.querySelectorAll(".jpb-chamadaHorizontalBoa").length;if(r{let r=i,u=document.querySelectorAll(".jpb-chamadaHorizontalBoa").length;if(r{listaChamadas.push(parseInt(n.getAttribute("article-id")))});document.querySelectorAll("section.jpb-chamadaHorizontalBoa").forEach(n=>{listaChamadas.push(parseInt(n.getAttribute("article-id")))});document.querySelector(".agenda-select-mes")&&document.querySelector(".agenda-select-mes").addEventListener("change",function(){let n=parseInt(this.value);document.querySelector("#agendaSection").innerHTML="";let t=jsonDataEvents.filter(function(t){let i=new Date(t.dataFormated),r=i.getFullYear(),u=i.getMonth()+1;return r==2024&&u==n});mountDates(t)});document.addEventListener("DOMContentLoaded",async function(){function u(n,t){let i=new Date(n.dataFormated),r=new Date(t.dataFormated);return i-r}let n=document.querySelector("body").getAttribute("data-category");const t="/ajax/agenda.json?CategoryId="+n,i=await fetch(t),r=await i.json();if(jsonDataEvents=r,jsonDataEvents.sort(u),document.querySelector(".agenda-select-mes")&&mountDates(),n==25&&(document.querySelector(".jpb-chamadaBoxBoa")&&mountChamadaBox(),document.querySelector(".jpb-chamadaHorizontalBoa")&&mountChamadaHorizontal()),n==33&&document.querySelector(".jpb-chamadaHorizontalBoa")&&mountChamadaHorizontal(),(n==35||n==36||n==37)&&(document.querySelectorAll(".chamadaHorizontalBoa-where-price").forEach(n=>{n.style.display="none"}),document.querySelectorAll(".chamadaHorizontalBoa-where-local-right").forEach(n=>{n.style.display="none"}),document.querySelectorAll(".chamadaBoxBoa-where-date").forEach(n=>{n.style.display="none"})),n==33){let t=document.querySelector(".jpb-chamadaHorizontalBoa"),n=document.createElement("span");n.className="jpb-new-events";n.textContent="Próximos eventos:";t.parentNode.insertBefore(n,t)}})