!function(){const e=(...e)=>{window?.console&&window?.dbpDebug&&console.log("[dbp]",...e)},t=t=>{const n=window.jQuery;if(!n)return;const o=n(t||document).find(".dbp-post-masonry .dbp-blog, .brbl_post_masonry .dbp-blog");o.length&&(e("found",o.length,"masonry grid(s)"),o.each(function(){((t,n)=>{if(n.data("dbp-isotope-init"))return;n.data("dbp-isotope-init",!0);const o=()=>{if(void 0===t.fn.isotope)return e("isotope not loaded yet, retrying"),void setTimeout(o,200);try{n.isotope({itemSelector:".dbp-blog-item",percentPosition:!0,layoutMode:"masonry",transitionDuration:"0.3s"}),e("isotope initialized",n[0])}catch(t){e("isotope error",t)}};void 0!==t.fn.imagesLoaded?n.imagesLoaded(o):o()})(n,n(this))}))},n={swipeToSlide:!0,edgeFriction:.35,useTransform:!0,touchThreshold:600,responsive:[{breakpoint:980,settings:{slidesToShow:2,slidesToScroll:1}},{breakpoint:767,settings:{slidesToShow:1,slidesToScroll:1}}]},o=t=>{const o=window.jQuery;if(!o)return;const r=o(t||document).find(".dbp-blog-carousel .dbp-blog, .brbl_post_carousel .dbp-blog");r.length&&(e("found",r.length,"carousel(s)"),r.each(function(){((t,o)=>{if(o.data("dbp-slick-init"))return;o.data("dbp-slick-init",!0);const r=()=>{if(void 0===t.fn.slick)return e("slick not loaded yet, retrying"),void setTimeout(r,200);let i={};try{i=o.data("slick")||{}}catch(e){i={}}const s=Object.assign({},n,i);Array.isArray(s.responsive)&&(s.responsive=s.responsive.map(e=>{const t=Math.min(e.settings.slidesToShow,s.slidesToShow||3);return{breakpoint:e.breakpoint,settings:Object.assign({},e.settings,{slidesToShow:t})}}));try{o.slick(s),e("slick initialized",o[0])}catch(t){e("slick error",t)}};r()})(o,o(this))}))},r=(e,t)=>{if("1"===t.dataset.dbpTickerInit)return;t.dataset.dbpTickerInit="1";let n={animation:"typewriter",autoplay:"on",speed:5e3,pauseOnHover:"on"};try{const e=t.getAttribute("data-ticker");e&&(n=Object.assign(n,JSON.parse(e)))}catch(e){}const o=e(t),r=o.find(".dbp-poststicker-wrap").first().find("ul > li"),i=r.length;if(0===i)return;let s=0,a=0,l=!0,c=null;r.css({display:"none",width:"100%",top:0,opacity:1}),r.eq(s).css({display:"block"});const d=()=>{"fade"===n.animation?(r.css({display:"none"}),r.eq(s).fadeIn("normal",function(){a=s,l=!0})):"typewriter"===n.animation?r.eq(a).animate({width:0},function(){e(this).css({display:"none",width:"100%"}),r.eq(s).css({width:0,display:"block"}),r.eq(s).animate({width:"100%"},500,function(){a=s,l=!0})}):"vertical"===n.animation&&(a<=s?(r.eq(a).animate({top:-60}),r.eq(s).css({top:60,display:"block"}),r.eq(s).animate({top:0},function(){a=s,l=!0})):(r.eq(a).animate({top:60}),r.eq(s).css({top:-60,display:"block"}),r.eq(s).animate({top:0},function(){a=s,l=!0})))},p=()=>{s++,s===i&&(s=0),d()},u=()=>{if(c)return;const e=Math.max(1e3,parseInt(n.speed,10)||5e3);c=setInterval(p,e)};"on"!==n.autoplay&&!0!==n.autoplay||(u(),"on"!==n.pauseOnHover&&!0!==n.pauseOnHover||(o.on("mouseenter",()=>{c&&(clearInterval(c),c=null)}),o.on("mouseleave",u))),o.find(".dbp-poststicker-nav span, .dbp-poststicker-controls button").on("click",function(){if(!l)return;l=!1;const t=e(this);t.hasClass("dbp-ticker-next")||1===t.index()?(s++,s===i&&(s=0)):(s--,s<0&&(s=i-1)),d()})},i=[".et-l--post .et_builder_inner_content",".et-l--post",".et_builder_inner_content","#main-content article","article.et_pb_post","main","#main-content"],s=e=>{const t=window.jQuery;if(!t)return;const n=t(e).find(".dbp-blog");if(n.length&&n.data("dbp-isotope-init")&&void 0!==n.isotope){const e=()=>{try{n.isotope("reloadItems").isotope()}catch(e){}};void 0!==n.imagesLoaded?n.imagesLoaded(e):e()}},a=e=>{if("1"===e.dataset.dbpPagingInit)return;e.dataset.dbpPagingInit="1";let t={};try{t=JSON.parse(e.getAttribute("data-config")||"{}")}catch(e){t={}}const n=e.getAttribute("data-dbp-grid"),o=e.getAttribute("data-pagination-type"),r=e.getAttribute("data-loadmore-mode"),i=e.querySelector(".dbp-blog");if(!i)return;let a=parseInt(e.getAttribute("data-current-page"),10)||1,l=parseInt(e.getAttribute("data-max-pages"),10)||1,c=!1;const d=t=>{c=t,e.classList.toggle("dbp-paging-busy",t)},p=o=>fetch(window.dbpFront&&window.dbpFront.restUrl||"/wp-json/divi-blog-pro/v1/render",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({grid:n,config:t,filter_taxonomy:e.getAttribute("data-filter-taxonomy")||"",filter_terms:e.getAttribute("data-filter-terms")||"",page:o})}).then(e=>e.json()),u=()=>{const t=e.querySelector(".dbp-pagination");if(!t)return;let n="";for(let e=1;e<=l;e++)n+=e===a?'<span class="page-numbers current">'+e+"</span>":'<a class="page-numbers" href="#" data-page="'+e+'">'+e+"</a>";t.innerHTML=n},h=()=>{c||a>=l||(d(!0),p(a+1).then(t=>{if(t&&"string"==typeof t.html&&(i.insertAdjacentHTML("beforeend",t.html),a=t.current||a+1,l=t.maxPages||l,e.setAttribute("data-current-page",a),s(e),a>=l)){const t=e.querySelector(".dbp-loadmore");t&&(t.style.display="none")}d(!1)}).catch(()=>d(!1)))};if("numbers"===o)u(),e.addEventListener("click",t=>{const n=t.target.closest(".dbp-pagination a[data-page]");var o;n&&(t.preventDefault(),o=parseInt(n.getAttribute("data-page"),10),c||o<1||o>l||o===a||(d(!0),p(o).then(t=>{t&&"string"==typeof t.html&&(i.innerHTML=t.html,a=t.current||o,l=t.maxPages||l,e.setAttribute("data-current-page",a),u(),s(e),e.scrollIntoView({behavior:"smooth",block:"start"})),d(!1)}).catch(()=>d(!1))))});else if("loadmore"===o)if("infinite"===r){const t=e.querySelector(".dbp-loadmore-infinite");t&&"IntersectionObserver"in window&&new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&h()})},{rootMargin:"300px"}).observe(t)}else e.addEventListener("click",e=>{e.target.closest(".dbp-loadmore-btn")&&(e.preventDefault(),h())});e.dbpApplyFilter=(t,n)=>{e.setAttribute("data-filter-taxonomy",t||""),e.setAttribute("data-filter-terms",n||""),d(!0),p(1).then(t=>{if(t&&"string"==typeof t.html){i.innerHTML=t.html,a=1,l=t.maxPages||1,e.setAttribute("data-current-page",1),"numbers"===o&&u();const n=e.querySelector(".dbp-loadmore");n&&(n.style.display=l>1?"":"none"),s(e)}d(!1)}).catch(()=>d(!1))}},l=e=>{const t=document.createElement("div");return t.textContent=null==e?"":String(e),t.innerHTML},c=e=>{const t=window.dbpFront&&window.dbpFront.searchUrl||"/wp-json/divi-blog-pro/v1/search";(e||document).querySelectorAll(".dbp-ajax-search").forEach(e=>{if("1"===e.dataset.dbpSearchInit)return;e.dataset.dbpSearchInit="1";let n={};try{n=JSON.parse(e.getAttribute("data-config")||"{}")}catch(e){n={}}const o=e.querySelector(".dbp-search-input"),r=e.querySelector(".dbp-search-results");if(!o||!r)return;const i=parseInt(n.minChars,10)||2;let s=null,a="";const c=()=>{r.hidden=!0};o.addEventListener("input",()=>{const d=o.value.trim();clearTimeout(s),d.length<i?c():s=setTimeout(()=>{d!==a&&(a=d,(i=>{e.classList.add("dbp-search-loading");const s=t+(-1===t.indexOf("?")?"?":"&")+"s="+encodeURIComponent(i)+"&post_type="+encodeURIComponent(n.postType||"post")+"&count="+(n.count||6)+"&show_thumb="+(n.showThumb?1:0)+"&show_excerpt="+(n.showExcerpt?1:0);fetch(s).then(e=>e.json()).then(t=>{var s;e.classList.remove("dbp-search-loading"),o.value.trim()===i&&((s=t.results||[]).length?r.innerHTML=s.map(e=>{const t=n.showThumb&&e.thumb?'<img src="'+l(e.thumb)+'" alt="" />':"",o=n.showExcerpt&&e.excerpt?'<span class="dbp-search-result-excerpt">'+l(e.excerpt)+"</span>":"";return'<a class="dbp-search-result" href="'+l(e.link)+'">'+t+'<span class="dbp-search-result-text"><span class="dbp-search-result-title">'+l(e.title)+"</span>"+o+"</span></a>"}).join(""):r.innerHTML='<div class="dbp-search-empty">'+l(n.noResults||"No results found.")+"</div>",r.hidden=!1)}).catch(()=>e.classList.remove("dbp-search-loading"))})(d))},250)}),o.addEventListener("focus",()=>{r.innerHTML&&(r.hidden=!1)}),o.addEventListener("keydown",e=>{"Escape"===e.key&&c()}),document.addEventListener("click",t=>{e.contains(t.target)||c()})})},d=n=>{t(n),o(n),(t=>{const n=window.jQuery;if(!n)return;const o=(t||document).querySelectorAll(".dbp-poststicker[data-ticker]");o.length&&(e("found",o.length,"ticker(s)"),o.forEach(e=>r(n,e)))})(n),(t=>{const n=(t||document).querySelectorAll(".dbp-toc[data-toc]");n.length&&(e("found",n.length,"TOC module(s)"),n.forEach(t=>(t=>{if(t.dataset.dbpTocInit)return;let n;t.dataset.dbpTocInit="1";try{n=JSON.parse(t.dataset.toc||"{}")}catch(e){n={}}const o=Math.min(n.startLevel||2,n.endLevel||4),r=Math.max(n.startLevel||2,n.endLevel||4),s=parseInt(n.scrollOffset,10)||0,a=Math.max(1,parseInt(n.minHeadings,10)||1);let l=t.querySelector(".dbp-toc-list");if(!l)return;const c=[],d=(e,t)=>{e.addEventListener("click",e=>{const o=document.getElementById(t);if(!o)return;e.preventDefault();const r=o.getBoundingClientRect().top+window.pageYOffset-s;window.scrollTo({top:r,behavior:n.smoothScroll?"smooth":"auto"}),history.replaceState&&history.replaceState(null,"","#"+t)})},p=t.classList.contains("dbp-toc-prerendered")&&l.querySelector("a");if(p)Array.prototype.forEach.call(l.querySelectorAll("a"),e=>{const t=e.getAttribute("href")||"",n="#"===t.charAt(0)?t.slice(1):"";n&&(c.push({li:e.closest(".dbp-toc-item"),id:n,heading:document.getElementById(n)}),d(e,n))}),t.classList.remove("dbp-toc-hidden");else{const e=((e,t)=>{if(t){const e=document.querySelector(t);if(e)return e}for(const e of i){const t=document.querySelector(e);if(t&&t.querySelector("h1,h2,h3,h4,h5,h6"))return t}return document.body})(0,n.contentSelector),s=[];for(let e=o;e<=r;e++)s.push("h"+e);const p={},u=Array.prototype.slice.call(e.querySelectorAll(s.join(","))).filter(e=>{if(e.closest(".dbp-toc"))return!1;if(n.excludeSelector)try{if(e.matches(n.excludeSelector)||e.closest(n.excludeSelector))return!1}catch(e){}return(e.textContent||"").trim().length>0});if(u.length<a)return void t.classList.add("dbp-toc-hidden");t.classList.remove("dbp-toc-hidden"),u.forEach(e=>{let t=e.id;if(!t){n=e.textContent,t=String(n).toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")||"section";let o=t,r=2;for(;document.getElementById(o)||p[o];)o=t+"-"+r++;t=o,e.id=t}var n;p[t]=!0});const h=document.createElement("ul");h.className="dbp-toc-list";const b=[{level:0,el:h}];u.forEach(e=>{const t=parseInt(e.tagName.charAt(1),10),n=document.createElement("li");n.className="dbp-toc-item";const o=document.createElement("a");for(o.href="#"+e.id,o.textContent=(e.textContent||"").trim(),n.appendChild(o);b.length>1&&b[b.length-1].level>=t;)b.pop();const r=b[b.length-1].el;let i;"UL"===r.tagName?i=r:(i=r.querySelector(":scope > ul"),i||(i=document.createElement("ul"),r.appendChild(i))),i.appendChild(n),b.push({level:t,el:n}),c.push({li:n,id:e.id,heading:e}),d(o,e.id)}),l.parentNode.replaceChild(h,l),l=h}const u=(e,t,n)=>{if(!e)return;if(n)return void(e.style.height=t?"0px":"");const o=e.scrollHeight;if(t)e.style.height=o+"px",e.getBoundingClientRect(),window.requestAnimationFrame(()=>{e.style.height="0px"});else{e.style.height=o+"px";const t=n=>{n.target===e&&(e.style.height="",e.removeEventListener("transitionend",t))};e.addEventListener("transitionend",t)}};if(n.collapsibleSubHeadings&&Array.prototype.forEach.call(l.querySelectorAll(".dbp-toc-item"),e=>{const t=e.querySelector(":scope > ul");if(!t)return;e.classList.add("dbp-toc-has-children");const o=document.createElement("button");o.type="button",o.className="dbp-toc-subtoggle",o.setAttribute("aria-label","Toggle sub-headings"),o.innerHTML='<span class="dbp-toc-arrow"></span>',e.insertBefore(o,t),n.subHeadingsCollapsed&&(e.classList.add("dbp-toc-sub-collapsed"),u(t,!0,!0)),o.addEventListener("click",n=>{n.preventDefault();const o=e.classList.toggle("dbp-toc-sub-collapsed");u(t,o,!1)})}),n.enableViewMore){const e=Math.max(1,parseInt(n.viewMoreCount,10)||5),t=Array.prototype.slice.call(l.children).filter(e=>e.classList&&e.classList.contains("dbp-toc-item"));if(t.length>e){const o=n=>{t.forEach((t,o)=>{o>=e&&t.classList.toggle("dbp-toc-hidden-item",!n)})};o(!1);const r=document.createElement("button");r.type="button",r.className="dbp-toc-viewmore",r.textContent=n.viewMoreText||"Show more";let i=!1;r.addEventListener("click",()=>{i=!i,o(i),r.textContent=i?n.viewLessText||"Show less":n.viewMoreText||"Show more"}),l.parentNode.appendChild(r)}}if(!1!==n.highlightActive&&c.length){let e=!1;const t=()=>{e=!1;const t=s+24;let n=null;for(let e=0;e<c.length;e++){const o=c[e].heading;if(o){if(!(o.getBoundingClientRect().top-t<=0))break;n=c[e].id}}null==n&&c[0]&&(n=c[0].id),c.forEach(e=>{e.li&&e.li.classList.toggle("dbp-toc-active",e.id===n)})},n=()=>{e||(e=!0,window.requestAnimationFrame(t))};window.addEventListener("scroll",n,{passive:!0}),t()}const h=t.querySelector(".dbp-toc-toggle"),b=t.querySelector(".dbp-toc-body");n.collapsible&&h&&b&&(t.classList.contains("dbp-toc-collapsed")&&(u(b,!0,!0),h.setAttribute("aria-expanded","false")),h.addEventListener("click",()=>{const e=t.classList.toggle("dbp-toc-collapsed");u(b,e,!1),h.setAttribute("aria-expanded",String(!e))})),e("TOC ready",c.length,"links",p?"(server)":"(js)")})(t)))})(n),(e=>{(e||document).querySelectorAll('[data-dbp-grid][data-ajax="1"]').forEach(a)})(n),(e=>{(e||document).querySelectorAll(".dbp-post-filter[data-filter-group]").forEach(e=>{if("1"===e.dataset.dbpFilterInit)return;e.dataset.dbpFilterInit="1";const t=e.getAttribute("data-filter-group"),n=e.getAttribute("data-taxonomy")||"category",o=Node.DOCUMENT_POSITION_FOLLOWING,r=r=>{(()=>{if(t)return document.querySelectorAll('[data-dbp-grid][data-filter-group="'+t+'"]');const n=Array.prototype.slice.call(document.querySelectorAll(".dbp-post-filter[data-filter-group]")),r=Array.prototype.slice.call(document.querySelectorAll("[data-dbp-grid]")),i=n[n.indexOf(e)+1]||null,s=r.filter(t=>{const n=!!(e.compareDocumentPosition(t)&o),r=!(i&&i.compareDocumentPosition(t)&o);return n&&r});if(s.length)return s;const a=e.closest(".et_pb_section, .et-l--section, section");if(a){const e=a.querySelectorAll("[data-dbp-grid]");if(e.length)return e}const l=r.filter(t=>e.compareDocumentPosition(t)&o);return l.length?[l[0]]:r.slice(0,1)})().forEach(e=>{e.dataset.dbpPagingInit||a(e),"function"==typeof e.dbpApplyFilter&&e.dbpApplyFilter(r?n:"",r)})};e.addEventListener("click",t=>{const n=t.target.closest(".dbp-filter-btn");n&&(t.preventDefault(),e.querySelectorAll(".dbp-filter-btn").forEach(e=>e.classList.remove("dbp-filter-active")),n.classList.add("dbp-filter-active"),n.scrollIntoView&&n.scrollIntoView({inline:"center",block:"nearest",behavior:"smooth"}),r(n.getAttribute("data-term")||""))});const i=e.querySelector(".dbp-filter-select");i&&i.addEventListener("change",()=>r(i.value||""));const s=e.querySelector(".dbp-filter-scroll"),l=e.querySelector(".dbp-filter-arrow-prev"),c=e.querySelector(".dbp-filter-arrow-next");if(s&&l&&c){const e=()=>{const e=s.scrollWidth-s.clientWidth-1;l.hidden=s.scrollLeft<=0,c.hidden=s.scrollLeft>=e||e<=0},t=()=>Math.max(120,.7*s.clientWidth);l.addEventListener("click",()=>s.scrollBy({left:-t(),behavior:"smooth"})),c.addEventListener("click",()=>s.scrollBy({left:t(),behavior:"smooth"})),s.addEventListener("scroll",e,{passive:!0}),window.addEventListener("resize",e,{passive:!0}),e()}})})(n),c(n)},p=()=>{window.jQuery?window.jQuery(function(){d(document)}):setTimeout(p,100)};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",p):p(),window.addEventListener("load",()=>d(document))}();.et_pb_heading_container{position:relative;width:100%}