let TBP_Predesigned;((e,t)=>{"use strict";const l=new IntersectionObserver(((t,l)=>{for(let s=t.length-1;s>-1;--s)if(!0===t[s].isIntersecting){let n=t[s].target,r=n.tfTag("img")[0],i=r.dataset.src,a=new Image(r.getAttribute("width"),r.getAttribute("height")),h=e.createElement("div");h.className="tf_loader tf_abs_c",a.decoding="async",a.src=i,a.title=a.alt=r.alt,n.appendChild(h),a.decode().finally((()=>{r.replaceWith(a),h.remove()})),l.unobserve(n)}}),{threshold:.1}),s=new Map,n=t.click,r=new URL("../../img/",e.currentScript.src).href;TBP_Predesigned={themeUrl:"https://themify.org/builder-pro-themes/wp-json/wp/v2/",demoUrl:"https://themify.org/public-api/builder-pro-demos/pro-",getHtml(s,i,a){const h=e.createElement("ul"),o=e.createDocumentFragment(),p=(t=>{const l="http://www.w3.org/2000/svg",s=e.createElementNS(l,"use"),n=e.createElementNS(l,"svg");return t="tf-"+t.trim().replace(" ","-"),n.setAttribute("class","tf_fa "+t),s.setAttributeNS(null,"href","#"+t),n.appendChild(s),n})("ti-search");let m=256,d=297;"header"===i||"footer"===i?(m=440,d=50):"theme"===i&&(m=262,d=196);const c="https://placehold.co/"+m+"x"+d+".webp?text=",g=r+("theme"===i?i:"template")+"-placeholder.webp";"blank"!==s[0].slug&&s.unshift({slug:"blank",title:{rendered:a.blank}});for(let n=0;n<s.length;++n){let r=e.createElement("li"),h=e.createElement("span"),f=s[n].title.rendered,b=e.createElement("div"),u=new Image(m,d),_=s[n].tbp_image_full||g,w=s[n].slug;if(r.dataset.slug=w,"blank"===w&&(r.className="blank selected"),b.className="thumb tf_rel",u.loading="lazy",u.decoding="async",u.src="blank"===w?t.builder_url+"img/blank-layout.webp":c+encodeURI(f),u.alt=u.title=f,_&&(u.dataset.src=_,l.observe(b)),h.className="title",h.innerHTML=f,"theme"===i&&s[n].link&&"#"!==s[n].link){let t=e.createElement("a"),l=e.createElement("a");l.href=t.href="https://themify.org/pro-"+w.replaceAll("_","-"),l.target=t.target="_blank",l.className="link tf_box",l.title=a.preview,l.appendChild(p.cloneNode(!0)),b.appendChild(l),t.appendChild(h),t.className=h.className,h.className="",h=t}if(b.appendChild(u),r.append(b,h),"theme"===i&&"blank"!==w){let t=e.createElement("input"),l=e.createElement("span"),s=e.createElement("label");t.type="checkbox",s.className="import_demo tf_rel tf_hide",l.className="tf_box tf_hide",l.textContent=a.import_warning,s.append(t,e.createTextNode(a.import_demo),l),r.appendChild(s)}o.appendChild(r)}return h.className="predesigned predesigned_"+i+" tf_textc",h.tfOn(n,(e=>{const t=e.target?e.target.closest("[data-slug]"):null;if(t){e.stopPropagation();for(let e=t.parentNode.children,l=e.length-1;l>-1;--l)e[l].classList.toggle("selected",e[l]===t)}}),{passive:!0}).appendChild(o),h},async get(e){let l=s.get(e);return l||(l=await t.fetch("",null,{credentials:"omit",method:"GET",mode:"cors",headers:{"Content-Type":"application/json"}},e),s.set(e,l)),l},getThemes(){return this.get(this.themeUrl+"tbp_theme")},getTemplates(e){return this.get(this.themeUrl+"tbp_template?template_type="+e)},getTemplate(e){return this.get(this.themeUrl+"tbp_template?slug="+e)},getTheme(e){return this.get(this.demoUrl+e.replaceAll("_","-")+"-templates-new.json")},getThemeDemo(e){return this.get(this.demoUrl+e.replaceAll("_","-")+"-new.json")}}})(document,Themify);