document.addEventListener("DOMContentLoaded",(e=>{var t;wpcf7_recaptcha={...null!==(t=wpcf7_recaptcha)&&void 0!==t?t:{}};const c=wpcf7_recaptcha.sitekey,{homepage:n,contactform:a}=wpcf7_recaptcha.actions,o=e=>{const{action:t,func:n,params:a}=e;grecaptcha.execute(c,{action:t}).then((e=>{const c=new CustomEvent("wpcf7grecaptchaexecuted",{detail:{action:t,token:e}});document.dispatchEvent(c)})).then((()=>{"function"==typeof n&&n(...a)})).catch((e=>console.error(e)))};if(grecaptcha.ready((()=>{o({action:n})})),document.addEventListener("change",(e=>{o({action:a})})),"undefined"!=typeof wpcf7&&"function"==typeof wpcf7.submit){const e=wpcf7.submit;wpcf7.submit=(t,c={})=>{o({action:a,func:e,params:[t,c]})}}document.addEventListener("wpcf7grecaptchaexecuted",(e=>{const t=document.querySelectorAll('form.wpcf7-form input[name="_wpcf7_recaptcha_response"]');for(let c=0;c<t.length;c++)t[c].setAttribute("value",e.detail.token)}))}));
(()=>{"use strict";function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function t(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n(e,t){if(e){if("string"==typeof e)return i(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function o(e){if(Array.isArray(e))return e}const l="email",a="phone",u="name",c={[l]:["email","e-mail","mail","email address"],[a]:["phone","tel","mobile","cell","telephone","phone number"],[u]:["name","full-name","full name","full_name","fullname","first-name","first name","first_name","firstname","last-name","last name","last_name","lastname","given-name","given name","given_name","givenname","family-name","family name","family_name","familyname","fname","lname","first","last","your-name","your name"]};function f(e){return e&&"string"==typeof e?e.trim().toLowerCase():""}function s(e){const t=f(e),r=t.lastIndexOf("@");if(-1===r)return t;const n=t.slice(r+1);if(["gmail.com","googlemail.com"].includes(n)){const e=t.slice(0,r).replace(/\./g,"");return"".concat(e,"@").concat(n)}return t}function m(e){const t=f(e),r=t.replace(/\D/g,"");return t.startsWith("+")?"+".concat(r):r}function y(l){const a=l.filter(e=>e.type===u).map(e=>f(e.value)).filter(Boolean);if(!a.length)return;const c=o(y=1===a.length?a[0].split(" "):a)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(y)||n(y)||r(),s=c[0],m=i(c).slice(1);var y;return function(r){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?e(Object(i),!0).forEach(function(e){t(r,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}({first_name:s},(null==m?void 0:m.length)>0?{last_name:m.join(" ")}:{})}function p(e){var t;return null===(t=e.find(e=>e.type===l))||void 0===t?void 0:t.value}function v(e){var t;return null===(t=e.find(e=>e.type===a))||void 0===t?void 0:t.value}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function g(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}globalThis.document.addEventListener("wpcf7mailsent",e=>{var t,i,h;const O=(null===(t=globalThis._googlesitekit)||void 0===t?void 0:t.gtagUserData)?function(e){if(!(e&&e instanceof HTMLFormElement))return;const t=new FormData(e);return function(e){const t=[["address",y(e)],["email",p(e)],["phone_number",v(e)]].filter(e=>{return(t=e,i=2,o(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,l,a=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(a.push(n.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(c)throw i}}return a}}(t,i)||n(t,i)||r())[1];var t,i});if(0!==t.length)return Object.fromEntries(t)}(Array.from(t.entries()).map(t=>{var r;let n=(p=2,function(e){if(Array.isArray(e))return e}(y=t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,l,a=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(a.push(n.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(c)throw i}}return a}}(y,p)||function(e,t){if(e){if("string"==typeof e)return b(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?b(e,t):void 0}}(y,p)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=n[0],o=n[1];var y,p;const v=e.querySelector("[name='".concat(i,"']")),d=null==v?void 0:v.type;return"hidden"===d||"submit"===d?null:function(e){let t=e||{},r=t.type,n=t.name,i=t.value,o=t.label;switch(r=f(r),n=f(n),i=f(i),o=function(e){return e&&"string"==typeof e?e.trim().toLowerCase().replace(/\s*\*+\s*$/,"").replace(/\s*\(required\)\s*$/i,"").replace(/\s*:\s*$/,"").trim():""}(o),r){case"email":return{type:l,value:s(i)};case"tel":return{type:a,value:m(i)}}return function(e){if(!e)return!1;const t=s(e);return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}(i)||c[l].includes(n)||c[l].includes(o)?{type:l,value:s(i)}:c[a].includes(n)||c[a].includes(o)?{type:a,value:m(i)}:c[u].includes(n)||c[u].includes(o)?{type:u,value:f(i)}:function(e){if(!e)return!1;if(!function(e){const t=e.replace(/\D/g,"");return!(t.length<7||t.length<e.length/2)&&/^[\s\-()+.\d]*$/.test(e)}(e))return!1;const t=m(e);if(!/^\+?\d{7,}$/.test(t))return!1;const r=/[\s\-()+.]/.test(e),n=e.trim().startsWith("+");return!(!r&&!n)}(i)?{type:a,value:m(i)}:null}({type:d,label:null!=v&&v.id?null===(r=e.querySelector("label[for='".concat(null==v?void 0:v.id,"']")))||void 0===r?void 0:r.textContent:void 0,name:i,value:o})}).filter(Boolean))}(e.target):null,j=e.detail.contactFormId;null===(i=globalThis._googlesitekit)||void 0===i||null===(h=i.gtagEvent)||void 0===h||h.call(i,"contact",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach(function(t){g(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({event_category:j,event_label:e.detail.unitTag,googlesitekit_event_provider:"contact-form-7",googlesitekit_form_id:String(j)},O?{user_data:O}:{}))})})();
"undefined"===typeof window.tdcPostSettings&&(window.tdcPostSettings={tdbTemplateType:"all"});if(window.tdbVue&&"undefined"!==typeof window.tdbVue.router){var eventHub=new CloudLibraryVue;CloudLibraryVue.component("image-links",{template:'\n            <a :class="classes" :href="link">{{text}}</a>\n        ',props:{classes:[],link:"",text:""}});new CloudLibraryVue({el:"#tdb-modal",router:window.tdbVue.router})}
window.tdbVueManager&&"undefined"!==typeof window.tdbVueManager.router&&new CloudLibraryVue({el:"#tdb-modal-website-manager",router:window.tdbVueManager.router});
(function(){function m(a,b,c,d,f,g,h){var e=jQuery(".tdb-"+a+"-templates");e.length&&"undefined"===typeof e.data("tdb-templates")&&("undefined"!==typeof g&&g.call(),tdbGetMobileTemplates(a,b,e),g="","undefined"!==typeof tdcState&&(g=tdcState.isMobileComposer()?"1":""),g={action:"tdb_get_"+a+"_templates",mobile_templates:g,_nonce:window.tdb_globals.wpRestNonce},"cpt_tax"===a?g.data_id=b:g[a+"_id"]=b,jQuery.ajax({type:"POST",url:td_ajax_url,data:g,success:function(g,k,p){e.html("");g=jQuery.parseJSON(g);
k='<div class="tdb-templates-header"><div class="tdb-templates-header-item tdb-templates-header-item-name"><span>Cloud Templates</span></div>'+("undefined"!==typeof d&&!0===d?'<div class="tdb-templates-header-item tdb-templates-header-item-global"><span>Global</span></div>':"")+'<div class="tdb-templates-header-item tdb-templates-header-item-mobile" title="Optional - Create or assign a dedicated Mobile Template"><span>Mobile Template</span></div></div>';var l=p="",m=!1;_.isArray(g)&&g.length?(_.each(g,
function(e,g,h){h="";"true"===e.is_current.toString()&&(h=" tdb-current",m=!0);var k="";g="";switch(a){case "single":k=e.template_title+" - Set template for this post";break;case "category":k=e.template_title+" - Set template for this category";break;case "author":k=e.template_title+" - Set template for this author";break;case "tag":k=e.template_title+" - Set template for this tag";break;case "search":""!==e.cpt?(k=e.template_title+" - Set this template for the "+e.cpt.label+" custom post type",g=
' data-cpt="'+e.cpt.name+'"'):k=e.template_title+" - Set this template for post search results";break;case "woo_product":k=e.template_title+" - Set template for this product";break;case "woo_archive":k=e.template_title+" - Set template for this product archive";break;case "cpt":k=e.template_title+" - Set template for this custom post type";break;case "cpt_tax":""!==e.cpt?(k=e.template_title+" - Set this template for the "+e.cpt.label+" custom post type archive",g=' data-cpt="'+e.cpt.name+'"'):k=e.template_title+
" - Set template for this taxonomy"}h='<div class="tdb-template-el tdb-'+a+"-template-el"+h+'"  data-template-id="'+e.template_id+'"><div class="tdb-template-el-id tdb-'+a+'-template-id">'+e.template_id+'</div><div class="tdb-template-el-title" data-type="'+a+'" data-action="'+c+'" title="'+k+'" data-'+a+'-id="'+b+'" data-template-id="'+e.template_id+'"'+g+">"+e.template_title+'</div><div class="tdb-template-el-wrap"><div class="tdb-template-el-icon"><div class="tdb-template-el-options"><div title="Rename template" class="tdb-template-el-edit">Rename</div><div title="Duplicate template" class="tdb-template-el-duplicate">Duplicate</div><div title="Delete template" class="tdb-template-el-delete">Delete</div></div></div></div>';
"undefined"!==typeof d&&!0===d&&(k="","undefined"!==typeof f&&""!==f&&(k='data-global-action="'+f+'"'),h+='<div class="tdb-template-el-global tdb-'+a+'-template-global" title="Set as Global Template" data-type="'+a+'" data-'+a+'-id="'+b+'" data-template-id="'+e.template_id+'" '+k+g+'><input type="checkbox" class="tdb-template-el-global-input tdb-'+a+'-template-global-input" '+(!0===e.is_global?'checked="checked" ':"")+'><label></label><span class="tdb-template-el-global-checked tdb-'+a+'-template-global-checked">Global</span></div>');
h+='<div class="tdb-template-el-mobile-wrap tdb-'+a+'-template-mobile" data-type="'+a+'" data-'+a+'-id="'+b+'" data-template-id="'+e.template_id+'"><span class="tdb-template-el-mobile">'+(""===e.mobile_template_title?"-":'<span class="tdb-template-el-mobile-active">Yes</span>')+'</span><div class="tdb-template-el-mobile-btns" data-mobile-template-id="'+e.mobile_template_id+'" data-template-id="'+e.template_id+'"><div title="Optional - New mobile template" class="'+a+"id-"+e.template_id+' tdb-template-el-mobile-btn tdb-template-el-mobile-blank tdb-create-mobile-template" data-type="'+
a+'" data-'+a+'-id="'+b+'" data-template-id="'+e.template_id+'"></div><div title="Load mobile template from TagDiv Cloud Library" class="'+a+"id-"+e.template_id+' tdb-template-el-mobile-btn tdb-template-el-mobile-import tdb-load-mobile-template"></div></div></div>';l+=h+"</div>"}),"undefined"!==typeof d&&!0===d&&(p+='<div class="tdb-template-el tdb-'+a+"-template-el "+(m?"":"tdb-current")+'"><div class="tdb-template-el-id tdb-'+a+'-template-id"></div><div class="tdb-template-el-title" data-type="'+
a+'" data-action="'+c+'" title="Set as Global Template" data-'+a+'-id="'+b+'" data-template-id="">Global Template</div></div>'),e.append(p+k+l)):(e.append(k),e.append('<div class="tdb-templates-desc">No cloud templates. Please import one or more templates from <b>Cloud Library</b>.</div>'));e.data("tdb-templates",!0);"undefined"!==typeof h&&h.call()},error:function(a,b,c){}}))}function n(a,b,c){var d=jQuery(window);d.resize(function(){var f=d.width();a.offset().left+b.width()>f?b.hasClass(c)||b.addClass(c):
b.hasClass(c)&&b.removeClass(c)});d.resize()}jQuery(document).ready(function(){jQuery("#wp-admin-bar-tdb_template_builder_disabled a").click(function(a){a.preventDefault();alert("Please select tagDiv Builder Template from the theme panel or set a default template. The current page/post uses a template that is not editable.")});jQuery("#wp-admin-bar-new-tdb_templates").hide()});jQuery("body").on("click","#wp-admin-bar-tdb_template_load, .tdb-load-mobile-template",function(a){a.preventDefault();var b=
jQuery(this),c=b.attr("class");a="";var d=!1;b.hasClass("tdb-load-mobile-template")&&(d=!0);"undefined"!==typeof c&&(0===c.indexOf("singleid-")?(a={wp_type:"single",templateType:"Single"},b=c.split(" ")[0].replace("singleid-",""),d?a.assign_mobile_to_template=b:a.assign_to_post=b):0===c.indexOf("categoryid-")?(a={wp_type:"category",templateType:"Category"},b=c.split(" ")[0].replace("categoryid-",""),d?a.assign_mobile_to_template=b:a.assign_to_category=b):0===c.indexOf("404")?(a={wp_type:"404",templateType:"404"},
b=btoa(window.location.href),d?a.assign_mobile_to_template=b:a.assign_to_404=b):0===c.indexOf("date")?(a={wp_type:"date",templateType:"Date"},b=btoa(window.location.href),d?a.assign_mobile_to_template=b:a.assign_to_archive=b):0===c.indexOf("search")?(a={wp_type:"search",templateType:"Search"},b=btoa(window.location.href),d?a.assign_mobile_to_template=b:a.assign_to_search=b,-1!==c.indexOf("cpt-")&&(c=c.split(" ")[1].replace("cpt-",""),a.assign_to_search_cpt=c)):0===c.indexOf("attachment")?(a={wp_type:"attachment",
templateType:"Attachment"},b=btoa(window.location.href),d?a.assign_mobile_to_template=b:a.assign_to_attachment=b):0===c.indexOf("authorid")?(a={wp_type:"author",templateType:"Author"},b=c.split(" ")[0].replace("authorid-",""),d?a.assign_mobile_to_template=b:a.assign_to_author=b):0===c.indexOf("tagid")?(a={wp_type:"tag",templateType:"Tag"},b=c.split(" ")[0].replace("tagid-",""),d?a.assign_mobile_to_template=b:a.assign_to_tag=b):0===c.indexOf("pageid")?(a={wp_type:"page",templateType:"Pages"},b=c.split(" ")[0].replace("pageid-",
""),d&&(a.assign_mobile_to_template=b)):0===c.indexOf("woo_productid-")?(a={wp_type:"woo_product",templateType:"Woo Product"},b=c.split(" ")[0].replace("woo_productid-",""),d?a.assign_mobile_to_template=b:a.assign_to_woo_product=b):0===c.indexOf("woo_archiveid-")?(a={wp_type:"woo_archive",templateType:"Woo Archive"},b=c.split(" ")[0].replace("woo_archiveid-",""),d?a.assign_mobile_to_template=b:a.assign_to_woo_archive=b):0===c.indexOf("woo_search_archive")?(a={wp_type:"woo_search_archive",templateType:"Woo Search"},
b=btoa(window.location.href),d?a.assign_mobile_to_template=b:a.assign_to_woo_search_archive=b):0===c.indexOf("woo_shop_base")?(a={wp_type:"woo_shop_base",templateType:"Woo Shop Base"},b=btoa(window.location.href),d?a.assign_mobile_to_template=b:a.assign_to_woo_shop_base=b):0===c.indexOf("cpt_tax")?(a={wp_type:"cpt_tax",templateType:"Custom Taxonomy"},b=c.split(" ")[0].replace("cpt_taxid-",""),d?a.assign_mobile_to_template=b:a.assign_to_cpt_tax=b):0===c.indexOf("cpt")&&(a={wp_type:"cpt",templateType:"Custom Post Type"},
b=c.split(" ")[0].replace("cptid-",""),d?a.assign_mobile_to_template=b:a.assign_to_cpt=b),""!==a&&(a.hide_mobile_selector="hide",window.tdbVue.router.push({name:"loadRoute",params:a})))}).on("click",".tdb-create-mobile-template",function(a){var b=jQuery(this),c=b.data("template-id"),d=b.data("type");tdConfirm.modal({caption:"Create Mobile "+("page"===d?"Page":"Template"),objectContext:window,callbackYes:function(){var a=jQuery("#tdb-new-template-name"),g=jQuery("#tdb-copy-content");jQuery.ajax({type:"POST",
url:td_ajax_url,data:{action:"tdb_create_mobile_template",template_id:c,template_title:a.val(),template_type:d,copyContent:g.is(":checked")?"1":"0",_nonce:window.tdb_globals.wpRestNonce},success:function(a,e,f){a=jQuery.parseJSON(a);"undefined"!==typeof a.mobile_template_id&&(tdConfirm.close(),e=b.closest(".tdb-template-el"),e.length&&(f=e.find(".tdb-template-el-mobile:first"),e.find(".tdb-template-el-mobile-btns:first").data("mobile-template-id",a.mobile_template_id),f.html('<span class="tdb-template-el-mobile-active">Yes</span>')),
tdbGetMobileTemplates(d,c))},error:function(a,b,c){}})},htmlInfoContent:"Enter the mobile "+("page"===d?"page":"template")+' name: <input id="tdb-new-template-name" type="text" value=""onfocus="(function(e){ jQuery(e.target).siblings(\'#tdb-modal-notice\').fadeOut(50); })(event)"/><em id="tdb-modal-notice"></em><div class="tdb-form-check"><input type="checkbox" class="form-check-input" id="tdb-copy-content"><label class="form-check-label" for="tdb-copy-content"><span class="tdb-check"></span><span class="tdb-check-title">Copy content</span></label></div>',
textYes:"Create",textNo:"Cancel"})}).on("click","#wp-admin-bar-tdb_template_single > a, #wp-admin-bar-tdb_template_category > a, #wp-admin-bar-tdb_template_404 > a, #wp-admin-bar-tdb_template_date > a, #wp-admin-bar-tdb_template_search > a, #wp-admin-bar-tdb_template_attachment > a, #wp-admin-bar-tdb_template_author > a, #wp-admin-bar-tdb_template_tag > a, #wp-admin-bar-tdb_template_woo_product > a, #wp-admin-bar-tdb_template_woo_archive > a, #wp-admin-bar-tdb_template_woo_shop_base > a, #wp-admin-bar-tdb_template_woo_search_archive > a, #wp-admin-bar-tdb_template_cpt > a, #wp-admin-bar-tdb_template_cpt_tax > a",
function(a){a.preventDefault();var b=jQuery(this),c=b.parent(),d=c.attr("class"),f="",g="",h="",e="";switch(c.attr("id")){case "wp-admin-bar-tdb_template_single":f="single";g="tdb_assign_single_template_to_post";h="tdb_assign_single_template_global";e=d.replace(f+"id-","");break;case "wp-admin-bar-tdb_template_category":f="category";g="tdb_assign_cat_template_to_cat";h="tdb_assign_cat_template_global";e=d.replace(f+"id-","");break;case "wp-admin-bar-tdb_template_404":f="404";g="tdb_assign_404_template_global";
h="";e=d.replace("templateid-","");break;case "wp-admin-bar-tdb_template_date":f="date";g="tdb_assign_date_template_global";h="";e=d.replace("templateid-","");break;case "wp-admin-bar-tdb_template_search":f="search";g="tdb_assign_search_template_global";h="";e=d.replace("templateid-","");break;case "wp-admin-bar-tdb_template_attachment":f="attachment";g="tdb_assign_attachment_template_global";h="";e=d.replace("templateid-","");break;case "wp-admin-bar-tdb_template_author":f="author";g="tdb_assign_author_template_to_author";
h="tdb_assign_author_template_global";e=d.replace(f+"id-","");break;case "wp-admin-bar-tdb_template_tag":f="tag";g="tdb_assign_tag_template_to_tag";h="tdb_assign_tag_template_global";e=d.replace(f+"id-","");break;case "wp-admin-bar-tdb_template_woo_product":f="woo_product";g="tdb_assign_woo_product_template_to_product";h="tdb_assign_woo_product_template_global";e=d.replace(f+"id-","");break;case "wp-admin-bar-tdb_template_woo_archive":f="woo_archive";g="tdb_assign_woo_archive_template_to_tax";h="tdb_assign_woo_archive_template_global";
e=d.replace(f+"id-","");break;case "wp-admin-bar-tdb_template_woo_search_archive":f="woo_search_archive";g="tdb_assign_woo_search_archive_template_global";h="";e=d.replace("templateid-","");break;case "wp-admin-bar-tdb_template_woo_shop_base":f="woo_shop_base";g="tdb_assign_woo_shop_base_template_global";h="";e=d.replace("templateid-","");break;case "wp-admin-bar-tdb_template_cpt":f="cpt";g="tdb_assign_cpt_template_to_cpt";h="tdb_assign_cpt_template_global";e=d.replace(f+"id-","");break;case "wp-admin-bar-tdb_template_cpt_tax":f=
"cpt_tax",g="tdb_assign_cpt_tax_template_to_tax",h="tdb_assign_cpt_tax_template_global",e=d.replace("templateid-","")}var l=jQuery(".tdb-"+f+"-templates");l.length?a.currentTarget===this&&jQuery(a.target).parent().attr("id")==="wp-admin-bar-tdb_template_"+f&&(l.toggle(),b.toggleClass("tdb-templates-open"),b.toggleClass("tdb-templates-close")):(b.addClass("tdb-templates-loading"),l=jQuery('<div class="tdb-templates tdb-'+f+'-templates" data-type="'+f+'"></div>'),l.insertAfter(b),l.show());m(f,e,g,
""===h?!1:!0,h,void 0,function(){b.removeClass("tdb-templates-loading");b.addClass("tdb-templates-open");n(b,l,"tdb-templates-align-right")})}).on("click","#wp-admin-bar-tdc_page_mobile_template > a",function(a){a.preventDefault();var b=jQuery(this);a=b.parent().attr("class").replace("pageid-","");var c=jQuery("#tdb-mobile-templates");c.length?(c.toggle(),b.toggleClass("tdb-templates-open"),b.toggleClass("tdb-templates-close")):(b.addClass("tdb-templates-loading"),b.addClass("tdb-templates-open"),
tdbGetMobileTemplates("page",a,b,void 0,function(){b.removeClass("tdb-templates-loading");jQuery("#tdb-mobile-templates").show();n(b,jQuery("#tdb-mobile-templates"),"tdb-mobile-templates-align-right")}))}).on("click","#wp-admin-bar-tdc_create_mobile_page",function(a){var b=jQuery(this).attr("class").split(" ")[0].replace("pageid-","");tdConfirm.modal({caption:"Create Mobile Page",objectContext:window,callbackYes:function(){var a=jQuery("#tdb-new-template-name"),d=jQuery("#tdb-copy-content");jQuery.ajax({type:"POST",
url:td_ajax_url,data:{action:"tdb_create_mobile_template",template_id:b,template_title:a.val(),template_type:"page",copyContent:d.is(":checked")?"1":"0",_nonce:window.tdb_globals.wpRestNonce},success:function(c,d,h){"undefined"!==typeof jQuery.parseJSON(c).mobile_template_id&&(tdConfirm.close(),c=jQuery("#wp-admin-bar-tdc_page_mobile_template"),c.length&&c.find("a:first").html('<span class="td-mob-page-before">Mobile page</span>'+a.val()),tdbGetMobileTemplates("page",b))},error:function(a,b,c){}})},
htmlInfoContent:'Enter the mobile page name: <input id="tdb-new-template-name" type="text" value="" onfocus="(function(e){ jQuery(e.target).siblings(\'#tdb-modal-notice\').fadeOut(50); })(event)"/><em id="tdb-modal-notice"></em><div class="tdb-form-check"><input type="checkbox" class="form-check-input" id="tdb-copy-content"><label class="form-check-label" for="tdb-copy-content"><span class="tdb-check"></span><span class="tdb-check-title">Copy content</span></label></div>',textYes:"Create",textNo:"Cancel"})}).on("click",
".tdb-single-template-global label, .tdb-category-template-global label, .tdb-author-template-global label, .tdb-tag-template-global label, .tdb-woo_product-template-global label, .tdb-woo_archive-template-global label, .tdb-cpt-template-global label, .tdb-cpt_tax-template-global label ",function(a){a.preventDefault();var b=jQuery(this);a=b.closest(".tdb-template-el-global");var c=a.data("type"),d=a.data("global-action"),f=b.parent().data(c+"-id"),g=b.parent().data("template-id"),h=jQuery(".tdb-templates");
b={action:d,template_id:g,_nonce:window.tdb_globals.wpRestNonce};switch(c){case "single":b.single_id=f;break;case "category":b.category_id=f;break;case "tag":b.tag_id=f;break;case "author":b.author_id=f;break;case "woo_product":b.woo_product_id=f;break;case "woo_archive":b.woo_term_id=f;break;case "cpt":b.cpt_id=f;b.option="single_tpl";break;case "cpt_tax":void 0!==a.data("cpt")?(b.action="tdb_assign_cpt_template_global",b.cpt=f,b.option="archive_tpl"):b.cpt_tax_id=f}jQuery.ajax({type:"POST",url:td_ajax_url,
data:b,success:function(a,b,d){a=jQuery.parseJSON(a);"undefined"!==typeof a.reload&&window.location.reload();"undefined"!==typeof a.global_template_id&&(h.find(".tdb-"+c+'-template-global > input[type="checkbox"]').removeAttr("checked"),h.find(".tdb-"+c+'-template-global[data-template-id="'+g+'"] > input[type="checkbox"]').attr("checked",!0))},error:function(a,b,c){}});return!1}).on("click",".tdb-template-el-title",function(a){a.preventDefault();if(a.target===a.currentTarget){a=jQuery(this);var b=
a.data("action"),c=a.data("type"),d=a.data(c+"-id"),f=a.data("template-id");b={action:b,template_id:f,_nonce:window.tdb_globals.wpRestNonce};"cpt"===c?b.cpt=a.data("cpt-id"):"cpt_tax"===c&&(b.cpt_tax=a.data("cpt_tax-id"));switch(c){case "single":b.single_id=d;break;case "category":b.category_id=d;break;case "author":b.author_id=d;break;case "tag":b.tag_id=d;break;case "woo_product":b.woo_product_id=d;break;case "woo_archive":b.woo_term_id=d;break;case "cpt":b.cpt_id=d;break;case "cpt_tax":void 0!==a.data("cpt")?(b.action="tdb_assign_cpt_template_global",b.cpt=d,b.option="archive_tpl"):b.cpt_tax_id=d;break;case "search":void 0!==a.data("cpt")&&(b.action="tdb_assign_cpt_template_global",b.cpt=d,b.option="search_tpl")}jQuery.ajax({type:"POST",url:td_ajax_url,data:b,success:function(a,b,d){"undefined"===typeof jQuery.parseJSON(a).reload&&"cpt"!==c&&"cpt_tax"!==c&&"search"!==c||window.location.reload()},error:function(a,b,c){}});return!1}}).on("change",".tdb-template-el-title-input",function(a){a.preventDefault();
a=jQuery(this);var b=a.closest(".tdb-templates"),c=a.closest(".tdb-template-el"),d=c.find(".tdb-template-el-title:first");b.data("type");b=c.data("template-id");d.html();jQuery.ajax({type:"POST",url:td_ajax_url,data:{action:"tdb_change_template_name",template_id:b,template_title:a.val(),_nonce:window.tdb_globals.wpRestNonce},success:function(a,b,c){a=jQuery.parseJSON(a);"undefined"!==typeof a.template_id&&(d.html(a.template_title),d.removeData("title"))},error:function(a,b,c){}})}).on("click",".tdb-template-el-edit",
function(a){a.preventDefault();var b=jQuery(this);a=b.closest(".tdb-templates");var c=b.closest(".tdb-template-el");b=c.find(".tdb-template-el-title:first");a.data("type");c.data("template-id");c=b.html();"undefined"===typeof b.data("title")&&(a.find(".tdb-template-el-title").each(function(a,b){a=jQuery(b);b=a.data("title");"undefined"!==typeof b&&(a.html(b),a.removeData("title"))}),b.data("title",b.html()),b.html('<input class="tdb-template-el-title-input" type="text" value="'+c+'">'),b.find("input").focus().select())}).on("click",
".tdb-template-el-duplicate",function(a){a.preventDefault();a=jQuery(this);var b=a.closest(".tdb-templates"),c=a.closest(".tdb-template-el"),d=c.find(".tdb-template-el-title:first"),f=b.data("type");a=c.data("template-id");var g=d.html(),h=d.data(f+"-id"),e=d.data("action"),l="";0<="single category tag author woo_product woo_archive".split(" ").indexOf(f)&&(c=c.find(".tdb-template-el-global:first"),c.length&&(l=c.data("global-action")));tdbApi.run({wpNonce:window.tdb_globals.wpRestNonce,cloudEndPoint:"td-cloud-library/new_template",
post:{postId:a,templateType:f,templateName:g,duplicateTemplate:!0},done:function(a){b.removeData("tdb-templates");m(f,0<="single category tag author woo_product woo_archive cpt".split(" ").indexOf(f)?h:"",e,""===l?!1:!0,l)},error:function(a){console.log("td-cloud-library/new_template(duplicate template) - ERROR",a)}});jQuery(".tdb-template-el-title-input").trigger("change")}).on("keyup",".tdb-template-el-title-input",function(a){27===a.keyCode&&jQuery(this).trigger("change")}).on("click",".tdb-template-el-delete",
function(a){a=jQuery(this);a.closest(".tdb-templates");var b=a.closest(".tdb-template-el");a=b.data("template-id");jQuery.ajax({type:"POST",url:td_ajax_url,data:{action:"tdb_delete_template",template_id:a,_nonce:window.tdb_globals.wpRestNonce},success:function(a,d,f){a=jQuery.parseJSON(a);"undefined"!==typeof a.reload&&window.location.reload();"undefined"!==typeof a.template_id&&b.remove()},error:function(a,b,f){}});jQuery(".tdb-template-el-title-input").trigger("change")}).on("click",function(a){a=
jQuery(a.target);a.closest("#wp-admin-bar-tdb_template_single").length||a.closest("#wp-admin-bar-tdb_template_category").length||a.closest("#wp-admin-bar-tdb_template_404").length||a.closest("#wp-admin-bar-tdb_template_date").length||a.closest("#wp-admin-bar-tdb_template_search").length||a.closest("#wp-admin-bar-tdb_template_attachment").length||a.closest("#wp-admin-bar-tdb_template_author").length||a.closest("#wp-admin-bar-tdb_template_tag").length||a.closest("#wp-admin-bar-tdb_template_woo_product").length||
a.closest("#wp-admin-bar-tdb_template_woo_archive").length||a.closest("#wp-admin-bar-tdb_template_woo_search_archive").length||a.closest("#wp-admin-bar-tdb_template_woo_shop_base").length||a.closest("#wp-admin-bar-tdb_template_cpt").length||a.closest("#wp-admin-bar-tdb_template_cpt_tax").length||a.closest("#wp-admin-bar-tdc_page_mobile_template").length||(a=jQuery(".tdb-templates"),a.length&&(a.hide(),a.prev("a").removeClass("tdb-templates-open").addClass("tdb-templates-close"),jQuery(".tdb-template-el-title-input").trigger("change")),
a=jQuery("#tdb-mobile-templates"),a.length&&(a.hide(),a.prev("a").removeClass("tdb-templates-open").addClass("tdb-templates-close")))}).on("click","#tdb-mobile-templates .tdb-template-el-mobile-list-el",function(a){var b=jQuery(this),c=jQuery("#tdb-mobile-templates");a=b.data("template-id");var d=b.data("mobile-template-id"),f=c.closest(".tdb-template-el-mobile-btns"),g=b.closest(".tdb-template-el-mobile-wrap"),h=b.closest("#wp-admin-bar-tdc_page_mobile_template");jQuery.ajax({type:"POST",url:td_ajax_url,
data:{action:"tdb_set_mobile_template",template_id:a,mobile_template_id:d,_nonce:window.tdb_globals.wpRestNonce},success:function(a,l,k){a=jQuery.parseJSON(a);_.isObject(a)&&!_.isUndefined(a.result)&&1===a.result&&(f.data("mobile-template-id",d),c.find(".tdb-template-el-mobile-list-el").removeClass("tdb-current"),c.find('.tdb-template-el-mobile-list-el[data-mobile-template-id="'+d+'"]').addClass("tdb-current"),g.length&&(a=g.find(".tdb-template-el-mobile:first"),""===d?a.html("-"):a.html('<span class="tdb-template-el-mobile-active">Yes</span>')),
h.length&&(h.find("a:first").html('<span class="td-mob-page-before" style="margin-right:10px;">Mobile page</span>'+b.find(".tdb-template-el-mobile-list-title:first").html()),"No mobile page"===b.find(".tdb-template-el-mobile-list-title:first").html()&&h.find("a:first").html('<span class="td-mob-page-before">Mobile page</span>')))}})}).on("click","#tdb-mobile-templates .tdb-template-el-mobile-list-edit",function(a){a.stopPropagation()}).on("click","#tdb-mobile-templates .tdb-template-el-mobile-list-delete",
function(a){a.stopPropagation();a=jQuery(this);var b=a.data("type"),c=a.closest(".tdb-template-el-mobile-list-el"),d=c.data("template-id");a=c.data("mobile-template-id");var f=c.hasClass("tdb-current"),g=jQuery("#tdb-mobile-templates").closest(".tdb-template-el");jQuery.ajax({type:"POST",url:td_ajax_url,data:{action:"tdb_delete_template",template_id:a,_nonce:window.tdb_globals.wpRestNonce},success:function(a,e,l){"undefined"!==typeof jQuery.parseJSON(a).template_id&&tdbGetMobileTemplates(b,d,void 0,
function(){jQuery("#tdb-mobile-templates").addClass("loading")},function(){jQuery("#tdb-mobile-templates").removeClass("loading");if(f)if("page"===b){var a=jQuery("#wp-admin-bar-tdc_page_mobile_template");a.length&&a.find("a:first").html('<span class="td-mob-page-before">Mobile page</span>No mobile page')}else c.remove(),g.length&&g.find(".tdb-template-el-mobile:first").html("-")})},error:function(a,b,c){}})}).on("mouseenter",".tdb-template-el-mobile-btns",function(a){a=jQuery(this);var b=a.data("mobile-template-id"),
c=a.data("template-id"),d=jQuery("#tdb-mobile-templates");d.find(".tdb-template-el-mobile-list-inner").is(":empty")||(d.appendTo(a).show(),d.find(".tdb-template-el-mobile-list-el").removeClass("tdb-current"),d.find(".tdb-template-el-mobile-list-el").data("template-id",c),d.find('.tdb-template-el-mobile-list-el[data-mobile-template-id="'+b+'"]').addClass("tdb-current"))}).on("mouseleave",".tdb-template-el-mobile-btns",function(a){a=jQuery(".tdb-templates");var b=jQuery("#tdb-mobile-templates");b.hide();
b.insertBefore(a);b.find(".tdb-template-el-mobile-list-el").removeClass("tdb-current")});jQuery(".tdb-templates");window.tdbGetMobileTemplates=function(a,b,c,d,f,g,h){var e=jQuery("#tdb-mobile-templates",g);e.length||(e=jQuery('<div id="tdb-mobile-templates" class="tdb-template-el-mobile-list"><div class="tdb-template-el-mobile-list-inner"></div><div class="tdb-template-el-mobile-list-separator" style="height: 1px;width: 100%;background-color: #ebebeb;margin: 10px 0;"></div><a href="https://tagdiv.com/newspaper-10-3-7-update-brings-customizable-and-fast-mobile-pages/" target="_blank" style="height: auto;padding: 0;color: #1a9a75;" class="tdb-template-el-mobile-list-no-el">Documentation &#187;</a></div>'),
e.hide());"undefined"!==typeof c&&e.insertAfter(c);c={action:"tdb_get_"+a+"_mobile_templates",_nonce:window.tdb_globals.wpRestNonce};c[a+"_id"]=b;"undefined"!==typeof window.tdbLoadDataFromId&&(c.tdbLoadDataFromId=window.tdbLoadDataFromId);"undefined"!==typeof d&&d.call();jQuery.ajax({type:"POST",url:td_ajax_url,data:c,success:function(c,d,g){var k="";g=jQuery.parseJSON(c);c='<li id="wp-admin-bar-tdb_template_load" class="pageid-'+b+' tdb-load-mobile-template tdb-template-el-mobile-list-el"><div class="ab-item ab-empty-item" title="Optional - Load mobile page from TagDiv Cloud Library"></div><span class="tdb-template-el-mobile-list-title">Load mobile page from Cloud Library</span></li><li id="wp-admin-bar-tdc_create_mobile_page" class="pageid-'+
b+' tdb-template-el-mobile-list-el"><div class="ab-item ab-empty-item" title="Optional - Create blank mobile page"></div><span class="tdb-template-el-mobile-list-title">Create blank mobile page</span></li>';if(_.isArray(g)&&g.length){var l=!1,m="template";d="";"page"===a&&(m="page",d=c+'<div class="tdb-template-el-mobile-list-separator" style="height: 1px;width: 100%;background-color: #ebebeb;margin: 10px 0;"></div>');_.each(g,function(c,d,e){d="";_.isUndefined(c.is_current)||(d="tdb-current",l=!0);
k+='<div class="tdb-template-el-mobile-list-el '+d+'" data-mobile-template-id="'+c.template_id+'" data-template-id="'+b+'"><div class="tdb-template-el-mobile-list-title" title="'+c.template_title+'">'+c.template_title+'</div><a class="tdb-template-el-mobile-list-edit" title="Edit mobile '+m+' with Composer" href="'+c.template_url+'" target="_blank"></a><div class="tdb-template-el-mobile-list-delete" title="Delete mobile '+m+'" data-type="'+a+'"></div></div>'});""!==k&&(g="",l||(g="tdb-current",l=
!0),k=d+'<div class="tdb-template-el-mobile-list-el '+g+'" data-mobile-template-id="" data-template-id="'+b+'"><div class="tdb-template-el-mobile-list-title">No mobile '+m+"</div></div>"+k);""!==k&&(e.html('<div class="tdb-template-el-mobile-list-inner">'+k+'</div><div class="tdb-template-el-mobile-list-separator" style="height: 1px;width: 100%;background-color: #ebebeb;margin: 10px 0;"></div><a href="https://tagdiv.com/newspaper-10-3-7-update-brings-customizable-and-fast-mobile-pages/" target="_blank" style="height: auto;padding: 0;color: #1a9a75;" class="tdb-template-el-mobile-list-no-el">Documentation &#187;</a>'),
d=e.parent(".tdb-template-el-mobile-btns"),!_.isUndefined(h)&&d.length&&(e.find(".tdb-template-el-mobile-list-el").removeClass("tdb-current"),e.find(".tdb-template-el-mobile-list-el").data("template-id",b),e.find('.tdb-template-el-mobile-list-el[data-mobile-template-id="'+h+'"]').addClass("tdb-current")),e.is(":visible")&&d.length?e.show():e.hide())}""===k&&("page"===a?e.html(c+'<div class="tdb-template-el-mobile-list-separator" style="height: 1px;width: 100%;background-color: #ebebeb;margin: 10px 0;"></div><div class="tdb-template-el-mobile-list-inner"><div class="tdb-template-el-mobile-list-no-el">No mobile page, please import or create a new mobile page.</div><div class="tdb-template-el-mobile-list-separator" style="height: 1px;width: 100%;background-color: #ebebeb;margin: 10px 0;"></div><a href="https://tagdiv.com/newspaper-10-3-7-update-brings-customizable-and-fast-mobile-pages/" target="_blank" style="height: auto;padding: 0;color: #1a9a75;" class="tdb-template-el-mobile-list-no-el">Documentation &#187;</a></div>'):
e.html(""));"undefined"!==typeof f&&f.call()}})}})();
jQuery(window).on("load",function(){if("undefined"!==typeof window.tdReadingProgressBar){var m=!1;window.parent===window.top&&"undefined"!==typeof window.name&&"tdc-live-iframe"===window.name&&"undefined"!==typeof window.parent.tdcSidebar&&(m=!0);if(window.self===window.top||m)jQuery(".tdb_single_reading_progress").each(function(){var n=jQuery(this),a=n.data("td-block-uid");n=n.data("bar-position");var b=new tdReadingProgressBar.item;b.blockUid=a;b.barPosition=n;tdReadingProgressBar.addItem(b);m&&
tdReadingProgressBar.createFixedBar(b,0,30)}),m||tdReadingProgressBar.calculateBarsFill()}});
var tdLoadingBox={};
(function(){tdLoadingBox={speed:40,arrayColorsTemp:"rgba(99, 99, 99, 0);rgba(99, 99, 99, 0.05);rgba(99, 99, 99, 0.08);rgba(99, 99, 99, 0.2);rgba(99, 99, 99, 0.3);rgba(99, 99, 99, 0.5);rgba(99, 99, 99, 0.6);rgba(99, 99, 99, 1)".split(";"),arrayColors:[],statusAnimation:"stop",stop:function(){tdLoadingBox.statusAnimation="stop"},init:function(a,b){!1===tdUtil.isUndefined(b)&&(tdLoadingBox.speed=b);b=/^#[a-zA-Z0-9]{3,6}$/;a&&b.test(a)?(a=tdLoadingBox.hexToRgb(a),a="rgba("+a.r+", "+a.g+", "+a.b+", ",
tdLoadingBox.arrayColors[7]=a+" 0.9)",tdLoadingBox.arrayColors[6]=a+" 0.7)",tdLoadingBox.arrayColors[5]=a+" 0.5)",tdLoadingBox.arrayColors[4]=a+" 0.3)",tdLoadingBox.arrayColors[3]=a+" 0.15)",tdLoadingBox.arrayColors[2]=a+" 0.15)",tdLoadingBox.arrayColors[1]=a+" 0.15)",tdLoadingBox.arrayColors[0]=a+" 0.15)"):tdLoadingBox.arrayColors=tdLoadingBox.arrayColorsTemp.slice(0);"stop"===tdLoadingBox.statusAnimation&&(tdLoadingBox.statusAnimation="display",this.render())},render:function(a){tdLoadingBox.animationDisplay('<div class="td-lb-box td-lb-box-1" style="background-color:'+
tdLoadingBox.arrayColors[0]+'"></div><div class="td-lb-box td-lb-box-2" style="background-color:'+tdLoadingBox.arrayColors[1]+'"></div><div class="td-lb-box td-lb-box-3" style="background-color:'+tdLoadingBox.arrayColors[2]+'"></div><div class="td-lb-box td-lb-box-4" style="background-color:'+tdLoadingBox.arrayColors[3]+'"></div><div class="td-lb-box td-lb-box-5" style="background-color:'+tdLoadingBox.arrayColors[4]+'"></div><div class="td-lb-box td-lb-box-6" style="background-color:'+tdLoadingBox.arrayColors[5]+
'"></div><div class="td-lb-box td-lb-box-7" style="background-color:'+tdLoadingBox.arrayColors[6]+'"></div><div class="td-lb-box td-lb-box-8" style="background-color:'+tdLoadingBox.arrayColors[7]+'"></div>');a=[tdLoadingBox.arrayColors[0],tdLoadingBox.arrayColors[1],tdLoadingBox.arrayColors[2],tdLoadingBox.arrayColors[3],tdLoadingBox.arrayColors[4],tdLoadingBox.arrayColors[5],tdLoadingBox.arrayColors[6],tdLoadingBox.arrayColors[7]];tdLoadingBox.arrayColors[0]=a[7];tdLoadingBox.arrayColors[1]=a[0];
tdLoadingBox.arrayColors[2]=a[1];tdLoadingBox.arrayColors[3]=a[2];tdLoadingBox.arrayColors[4]=a[3];tdLoadingBox.arrayColors[5]=a[4];tdLoadingBox.arrayColors[6]=a[5];tdLoadingBox.arrayColors[7]=a[6];"display"===tdLoadingBox.statusAnimation?setTimeout(tdLoadingBox.render,tdLoadingBox.speed):tdLoadingBox.animationDisplay("")},animationDisplay:function(a){jQuery(".td-loader-gif").html(a)},hexToRgb:function(a){return(a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a))?{r:parseInt(a[1],16),g:parseInt(a[2],
16),b:parseInt(a[3],16)}:null}}})();
var tdbMenu={};
(function(){tdbMenu={ui_events:"mouseover click keydown wheel touchmove touchstart".split(" "),items:[],item:function(){this.blockAtts=this.blockUid="";this._outsideClickArea=this._mainMenu=this._itemsWithSubmenu=null;this._outsideClickExcludedAreas="";this._openMenuClass="tdb-hover";this._openMenuBodyClass="tdb-open-menu";this.isMegaMenuParentPos=this.isMegaMenuFull=this.inComposer=!1;this.megaMenuLoadType="";this._is_initialized=!1},init:function(){tdbMenu.items=[]},_initialize_item:function(a){if(!0!==a._is_initialized){tdbMenu._setHover(a);
var b=0<jQuery("."+a.blockUid).parents(".td-header-template-wrap").length,e=a.jqueryObj.find(".tdb-menu .tdb-mega-menu .sub-menu"),d=a.jqueryObj.find(".tdb-menu .tdb-mega-menu-page .sub-menu"),f=a.jqueryObj.find(".tdb-menu .tdb-mega-menu-cat .sub-menu");0<e.length&&(window.tdb_p_autoload_vars.isAjax?b||(a.isMegaMenuFull&&tdbMenu.megaMenuFull(a,a.inComposer),a.isMegaMenuParentPos&&tdbMenu.megaMenuParentPos(a,a.inComposer)):(a.isMegaMenuFull&&tdbMenu.megaMenuFull(a,a.inComposer),a.isMegaMenuParentPos&&
tdbMenu.megaMenuParentPos(a,a.inComposer)));if("ui_delayed"===a.megaMenuLoadType&&!a.inComposer&&(0<d.length||0<f.length))a.jqueryObj.on("ui_delayed_load",function(){0<d.length&&tdbMenu.loadDelayedPageMM(a);0<f.length&&tdbMenu.loadDelayedCatMM(a)});0<d.length&&0<jQuery("."+a.blockUid).parents(".tdc-row-is-sticky").length&&(window.tdb_p_autoload_vars.isAjax?b||tdbMenu.pageMegaMenuHeight(a,a.inComposer):tdbMenu.pageMegaMenuHeight(a,a.inComposer));a._is_initialized=!0}},loadDelayed:function(a){for(a=
0;a<tdbMenu.items.length;a++){var b=tdbMenu.items[a];"ui_delayed"!==b.megaMenuLoadType||b.inComposer||b.jqueryObj.trigger("ui_delayed_load")}tdbMenu.ui_events.forEach(function(a){window.removeEventListener(a,tdbMenu.loadDelayed,{passive:!0})})},loadDelayedPageMM:function(a){a.jqueryObj.find(".tdb-menu .tdb-mega-menu-page").each(function(){var a=jQuery(this).find("li.menu-item-0"),e=a.find(".tdb-menu-item-text"),d=a.data("p-mm-id");jQuery.ajax({type:"POST",url:td_ajax_url,data:{action:"tdb_get_mm_page",
pageId:d,td_res_context_registered_atts:td_res_context_registered_atts},success:function(a,b,c){a=jQuery.parseJSON(a);"undefined"!==typeof a.content&&(jQuery(a.content).appendTo(e),"undefined"!==typeof window.tdAnimationStack&&!0===window.tdAnimationStack.activated&&window.tdAnimationStack.reinit())},error:function(a,b,c){console.group("%c tdbMenu.loadDelayedPageMM/tdb_get_mm_page: error","color: orangered;");console.log("Post: ",{pageId:d});console.log("errorThrown: ",c);console.groupEnd()}})})},
loadDelayedCatMM:function(a){a.jqueryObj.find(".tdb-menu .tdb-mega-menu-cat").each(function(){var b=jQuery(this).find("li.menu-item-0"),e=b.find(".tdb-menu-item-text"),d=b.data("cat-mm-id");jQuery.ajax({type:"POST",url:td_ajax_url,data:{action:"tdb_get_mm_cat",td_block_atts:a.blockAtts,cat_mm_id:d},success:function(a,b,c){a=jQuery.parseJSON(a);"undefined"!==typeof a.content&&(jQuery(a.content).appendTo(e),"undefined"!==typeof window.tdAnimationStack&&!0===window.tdAnimationStack.activated&&window.tdAnimationStack.reinit())},
error:function(a,b,c){console.group("%c tdbMenu.loadDelayedCatMM/tdb_get_mm_cat: error","color: orangered;");console.log("Post: ",{cat_mm_id:d});console.log("errorThrown: ",c);console.groupEnd()}})})},addItem:function(a){if("undefined"===typeof a.blockUid)throw"item.blockUid is not defined";tdbMenu.items.push(a);tdbMenu._initialize_item(a)},deleteItem:function(a){for(var b=0;b<tdbMenu.items.length;b++)if(tdbMenu.items[b].blockUid===a)return tdbMenu.items.splice(b,1),!0;return!1},megaMenuFull:function(a,
b){function e(){k=d.find(".tdb-menu .tdb-mega-menu .sub-menu");k.each(function(){c=-f.left+"px";jQuery(this).attr("style","left:"+c+"; width: "+jQuery("body").outerWidth()+"px !important")});h||(d.find(".tdb-mega-menu-inactive").removeClass("tdb-mega-menu-inactive"),h=!0)}var d=a.jqueryObj,f,g,c,k,h=!1;jQuery(window).resize(function(){setTimeout(function(){f=d.offset();g=f.left;e();b&&setInterval(function(){f=d.offset();f.left!==g&&(e(),g=f.left)},1E3)},1500)});jQuery(window).resize()},megaMenuParentPos:function(a,
b){function e(){c=d.find(".tdb-menu .tdb-mega-menu > ul");c.show();c.each(function(){jQuery(this).css("left","");k=jQuery(this).offset();h=k.left;0>h?jQuery(this).offset({left:0}):(l=jQuery(window).width()-(h+jQuery(this).outerWidth()),0>l&&jQuery(this).offset({left:jQuery(window).width()-jQuery(this).outerWidth()}))});m||(d.find(".tdb-mega-menu-inactive").removeClass("tdb-mega-menu-inactive"),m=!0);c.hide()}var d=a.jqueryObj,f,g,c,k,h,l,m=!1;setTimeout(function(){jQuery(window).resize(function(){f=
d.offset();g=f.left;e();b&&setInterval(function(){f=d.offset();f.left!==g&&(e(),g=f.left)},1E3)});jQuery(window).resize()},60)},pageMegaMenuHeight:function(a,b){function e(){g.show();g.each(function(){var a=jQuery(this),b=a.find("> li"),e=f.offset().top+f.outerHeight();b=b.outerHeight();var g=d.scrollTop(),m=d.height();e+b>m+g?a.css({height:m+g-e,"overflow-y":"auto"}):a.css({height:"auto","overflow-y":"visible"})});g.hide()}var d=jQuery(window),f=a.jqueryObj,g=f.find(".tdb-menu .tdb-mega-menu-page > ul");
setTimeout(function(){d.on("resize scroll",function(){e();b&&setInterval(function(){e()},1E3)});d.resize().scroll()},1500)},_getSubmenuPosition:function(a){var b=jQuery(window).width();a=a.children(".sub-menu").first();if(0<a.length){var e=a.offset().left+a.width();e>b&&(a.parent().parent().hasClass("tdb-menu")?a.css("left","-"+(e-b)+"px"):a.addClass("reversed").css("left","-"+(a.width()+0)+"px"))}},_getMouseAngleDirection:function(a,b,e,d){return Math.atan2(e-a,d-b)/Math.PI*180},_setHover:function(a){var b=
a.jqueryObj.find(".tdb-menu");b.supersubs({minWidth:10,maxWidth:20,extraWidth:1,applyMin:!0});var e=b.find(".menu-item-has-children > a, .tdb-mega-menu > a");e.parent().find(".sub-menu").first().css("display","none");if(tdDetect.isTouchDevice)jQuery(document).on("touchstart","body",function(c){var b=e.parent(),d=jQuery("body");d.hasClass(a._openMenuBodyClass)&&!b.is(c.target)&&0===b.has(c.target).length&&(b.removeClass(a._openMenuClass),b.children(".sub-menu").hide(),d.removeClass(a._openMenuBodyClass))}),
e.on("touchstart",function(c){c.preventDefault();c.stopPropagation();var b=jQuery(this);c=b.parent();var d=jQuery("body");c.hasClass(a._openMenuClass)?null!==b.attr("href")&&"#"!==b.attr("href")?window.location.href=b.attr("href"):((c.parent().hasClass("tdb-menu")||c.parent().hasClass("top-header-menu"))&&d.removeClass(a._openMenuBodyClass),c.removeClass(a._openMenuClass),c.find(".sub-menu").hide(),c.find("li").removeClass(a._openMenuClass)):(c.parent().hasClass("tdb-menu")||c.parent().hasClass("top-header-menu")?
(e.parent().removeClass(a._openMenuClass),e.parent().children(".sub-menu").hide()):(b=c.siblings(),b.removeClass(a._openMenuClass),b.find(".sub-menu").hide(),b.find("li").removeClass(a._openMenuClass)),c.addClass(a._openMenuClass),c.children(".sub-menu").show(),tdbMenu._getSubmenuPosition(c),d.addClass(a._openMenuBodyClass))});else{var d={},f,g=!0;b.on("mouseleave",function(){e.parent().removeClass(a._openMenuClass);e.parent().children(".sub-menu").hide();d={}});b.find(".menu-item").hover(function(){var b=
jQuery(this),k="",h,l;if(b.hasClass("menu-item-has-children")||b.hasClass("tdb-mega-menu"))if(b.parent().hasClass("tdb-menu"))if(jQuery.isEmptyObject(d))b.addClass(a._openMenuClass),b.children(".sub-menu").show(),d=b;else{if(b[0]!==d[0]){var m=l=h=0;var n=null;!0===g&&(g=!1,f=setTimeout(function(){e.parent().removeClass(a._openMenuClass);e.parent().children(".sub-menu").hide();b.addClass(a._openMenuClass);b.children(".sub-menu").show();d=b},400));b.on("mousemove",function(c){5<=h?(h=0,n=tdbMenu._getMouseAngleDirection(l,
m,c.pageX,c.pageY),l=c.pageX,m=c.pageY):(h++,0===l&&0===m&&(l=c.pageX,m=c.pageY));null!==n&&(85<n||-85>n)&&(e.parent().removeClass(a._openMenuClass),e.parent().children(".sub-menu").hide(),b.addClass(a._openMenuClass),b.children(".sub-menu").show(),b.off("mousemove"),clearTimeout(f),g=!0,d=b)})}}else k=b.siblings(),k.removeClass(a._openMenuClass),k.find(".sub-menu").hide(),k.find("li").removeClass(a._openMenuClass),b.addClass(a._openMenuClass),b.children(".sub-menu").show(),tdbMenu._getSubmenuPosition(b);
else b.parent().hasClass("tdb-menu")?jQuery.isEmptyObject(d)||(m=l=h=0,n=null,!0===g&&(g=!1,f=setTimeout(function(){e.parent().removeClass(a._openMenuClass);e.parent().children(".sub-menu").hide();d={}},400)),b.on("mousemove",function(c){5<=h?(h=0,n=tdbMenu._getMouseAngleDirection(l,m,c.pageX,c.pageY),l=c.pageX,m=c.pageY):(h++,0===l&&0===m&&(l=c.pageX,m=c.pageY));null!==n&&(85<n||-85>n)&&(e.parent().removeClass(a._openMenuClass),e.parent().children(".sub-menu").hide(),b.off("mousemove"),clearTimeout(f),
g=!0,d={})})):(d=b.parent(),k=b.siblings(),k.removeClass(a._openMenuClass),k.find(".sub-menu").hide(),k.find("li").removeClass(a._openMenuClass))},function(){var a=jQuery(this);!1===g&&(clearTimeout(f),g=!0);a.off("mousemove")})}},unsetHover:function(a){null!==a._itemsWithSubmenu&&a._itemsWithSubmenu.off();null!==a._outsideClickArea&&a._outsideClickArea.off()}}})();var tdbMenuItemPullDown={};
(function(){tdbMenuItemPullDown={init:function(){setTimeout(function(){jQuery(".tdb-menu-items-pulldown").each(function(a,b){var e=jQuery(b),d=e.parent().attr("id");b=jQuery("."+d);var f="";"none"!==b.css("max-width")&&(f=b.css("max-width"));if(b.hasClass("tdb-menu-items-in-more")){var g=e.find(".tdb-menu:first"),c=g.parents(".tdb-menu-items-pulldown:first"),k=[];a=new tdPullDown.item;if(void 0!==b.css("display")&&"inline-block"===b.css("display")){var h=b.closest(".vc_column_container");c=h;var l=
"";l=0!==h.find(".tdc-elements").length?".tdc-elements":".wpb_wrapper";h.find(l+" > .td_block_wrap").each(function(){var a=.9*h.outerWidth(!0),b=jQuery(this).outerWidth(!0);if(jQuery(this).data("td-block-uid")!==d)if(b<a)k.push(jQuery(this));else return!1})}a.blockUid=d;a.horizontal_jquery_obj=g;a.vertical_jquery_obj=e.find(".tdb-menu-items-dropdown:first");a.horizontal_element_css_class="tdb-menu-item-button";a.horizontal_no_items_css_class="tdb-menu-items-empty";a.container_jquery_obj=c;a.horizontal_max_width=
f;a.excluded_jquery_elements=k;a.isTdbMenu=!0;e=b.find(".tdb-main-sub-icon-fake");e.length&&(a.main_sub_icon=e.html());b=b.find(".tdb-sub-icon-fake");b.length&&(a.sub_icon=b.html());tdPullDown.add_item(a)}g.parents(".tdb-menu-items-pulldown:first").hasClass("tdb-menu-items-pulldown-inactive")&&g.parents(".tdb-menu-items-pulldown:first").removeClass("tdb-menu-items-pulldown-inactive")})},50)}}})();jQuery().ready(function(){});
jQuery(document).ready(function(){tdbMenuItemPullDown.init();tdbMenu.ui_events.forEach(function(a){window.addEventListener(a,tdbMenu.loadDelayed,{passive:!0})})});
var tdToTop={};jQuery().ready(function(){tdToTop.init()});
(function(){tdToTop={$element:void 0,style:"",init:function(){var a=jQuery(".td-scroll-up");if(a.length){tdToTop.$element=a;tdToTop.style="undefined"!==typeof a.data("style")?a.data("style"):"style1";switch(tdToTop.style){case "style2":jQuery("body").css({position:"relative","overflow-x":"hidden"})}a.on("click",function(a){return tdToTop.handle_click_event(a)})}},td_events_scroll:function(a){if("undefined"!==typeof tdToTop.$element)switch(400<a?tdToTop.$element.hasClass("td-scroll-up-visible")||tdToTop.$element.addClass("td-scroll-up-visible"):
tdToTop.$element.hasClass("td-scroll-up-visible")&&tdToTop.$element.removeClass("td-scroll-up-visible"),tdToTop.style){case "style2":var b=tdToTop.$element.find(".td-scroll-up-progress-circle path"),c=b.get(0).getTotalLength(),d=jQuery(document).height()-jQuery(window).height();b.css({"stroke-dashoffset":c-a*c/d});a=jQuery(".td-footer-template-wrap");a.length&&(tdUtil.isInViewport(a)?tdToTop.$element.css({position:"absolute",bottom:a.outerHeight()+4}):tdToTop.$element.css({position:"fixed",bottom:4}))}},
handle_click_event:function(a){a.preventDefault();tdToTop.$element.hasClass("td-scroll-up-visible")&&tdToTop.$element.removeClass("td-scroll-up-visible");td_more_articles_box.is_box_visible=!1;jQuery(".td-more-articles-box").removeClass("td-front-end-display-block");tdUtil.scrollToPosition(0,1200)}}})();
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.makeIterator=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):$jscomp.arrayIterator(a)};var tdPopupModal={};jQuery().ready(function(){tdPopupModal.init()});
(function(){tdPopupModal={ui_events:"mouseover click keydown wheel touchmove touchstart".split(" "),items:[],itemsQueue:[],item:function(){this.blockUid=this.uid="";this.modalObj=this.triggerBtnObj=void 0;this.closeModals=[];this._modal_trigger_types=[];this._modal_content_load_data=this._modal_content_load=this._modal_open_position="";this._site_scroll=!0;this._is_initialized=this._show_modal_in_composer=this._in_composer=this._is_modal_open=!1},init:function(){tdPopupModal.items=[];this._is_running=
!1},_initialize_item:function(a){if(!0!==a._is_initialized){a._is_initialized=!0;if(a._in_composer){var b=document.getElementsByClassName(a.blockUid)[0];b.classList.contains("tdc-element-selected")&&!0===a._show_modal_in_composer&&tdPopupModal.modalOpen(a);(new MutationObserver(function(b,c){b.forEach(function(b){"class"===b.attributeName&&(b=b.target.classList,b.contains("tdc-element-selected")&&!b.contains("tdc-dragged")?!0===a._show_modal_in_composer?tdPopupModal.modalOpen(a):tdPopupModal.modalClose(a):
tdPopupModal.modalClose(a))})})).observe(b,{attributes:!0})}else if(tdPopupModal.modalManageOpenState(a),tdPopupModal.modalManageCloseState(a),"ui_delayed"===a._modal_content_load)a.modalObj.on("ui_delayed_load",function(){tdPopupModal.modalLoadContent(a)});tdPopupModal.modalOpenPosition(a)}},addItem:function(a){if("undefined"===typeof a.uid)throw"item.uid is not defined";tdPopupModal.items.push(a);tdPopupModal._initialize_item(a)},getItem:function(a){for(var b=0;b<tdPopupModal.items.length;b++)if(tdPopupModal.items[b].uid===a)return tdPopupModal.items[b];return!1},modalManageOpenState:function(a){for(var b={},d=$jscomp.makeIterator(Object.entries(a._modal_trigger_types)),c=d.next();!c.done;b={$jscomp$loop$prop$trigger_options$8:b.$jscomp$loop$prop$trigger_options$8},c=d.next()){c=$jscomp.makeIterator(c.value);var e=c.next().value;b.$jscomp$loop$prop$trigger_options$8=c.next().value;switch(e){case "button":"undefined"!==typeof a.triggerBtnObj&&a.triggerBtnObj.click(function(b){b.preventDefault();tdPopupModal.modalOpen(a)});
break;case "page_load":c=b.$jscomp$loop$prop$trigger_options$8.modal_open_delay;var f=b.$jscomp$loop$prop$trigger_options$8.modal_close_after,g=b.$jscomp$loop$prop$trigger_options$8.modal_prevent_open;e=a.uid;0==g&&tdPopupModal.setCookie(e,"",g);""!=tdPopupModal.getCookie(e)||a._is_modal_open||setTimeout(function(){tdPopupModal.modalOpen(a);0<f&&a._is_modal_open&&setTimeout(function(){tdPopupModal.modalClose(a);var b=a.uid;0<g&&""==tdPopupModal.getCookie(b)&&tdPopupModal.setCookie(b,"set",g)},f)},
c);break;case "cursor_area":c=function(b){return function(c){""===tdPopupModal.getCookie(a.uid)&&b.$jscomp$loop$prop$trigger_options$8.area_vertical_space.trim()>=c.y&&tdPopupModal.modalOpen(a)}}(b);document.addEventListener("mousemove",tdPopupModal._checkModal(c,300));break;case "scroll":c=function(b){return function(c){if(""===tdPopupModal.getCookie(a.uid)){var d=b.$jscomp$loop$prop$trigger_options$8.scroll_distance.trim();0<d.indexOf("%")?(d=parseInt(d.replace(/%/gi,""),10),100*window.scrollY/
document.body.clientHeight>d&&tdPopupModal.modalOpen(a)):(0<d.indexOf("px")&&(d=parseInt(d.replace(/px/gi,""),10)),c.target.scrollingElement.scrollTop>d&&tdPopupModal.modalOpen(a))}}}(b),document.addEventListener("scroll",tdPopupModal._checkModal(c,10))}}},_checkModal:function(a,b){var d=Date.now()-b;return function(c){for(var e=[],f=0;f<arguments.length;++f)e[f-0]=arguments[f];Date.now()-d>=b&&(d=Date.now(),a.apply(null,e))}},modalManageCloseState:function(a){var b=["tdm-pmh-close"];"over-screen"===a._modal_open_position&&b.push("tdm-popup-modal-bg");jQuery("#tdm-popup-modal-"+a.uid+" .tdm-pmh-close,#tdm-popup-modal-"+a.uid+" .tdm-popup-modal-bg").click(function(){if(!0===a._is_modal_open){tdPopupModal.modalClose(a);for(var b=$jscomp.makeIterator(Object.entries(a._modal_trigger_types)),c=b.next();!c.done;c=b.next()){var e=$jscomp.makeIterator(c.value);c=e.next().value;e=e.next().value;switch(c){case "page_load":c=e.modal_prevent_open;e=a.uid;0<c&&""==tdPopupModal.getCookie(e)&&tdPopupModal.setCookie(e,
"set",c);break;case "cursor_area":c=e.modal_area_prevent_open;0<c&&""===tdPopupModal.getCookie(a.uid)&&tdPopupModal.setCookie(a.uid,"set",c);break;case "scroll":c=e.modal_scroll_prevent_open,0<c&&""===tdPopupModal.getCookie(a.uid)&&tdPopupModal.setCookie(a.uid,"set",c)}}}})},modalOpenPosition:function(a){switch(a._modal_open_position){case "over-screen":a.modalObj.detach().prependTo("body"),a.modalObj.attr("style","")}},modalOpen:function(a){if(!a._is_modal_open){for(var b=!1,d=0;d<tdPopupModal.items.length;d++)if(tdPopupModal.items[d].uid!==a.uid&&tdPopupModal.items[d]._is_modal_open){b=!0;break}d=!1;for(var c=$jscomp.makeIterator(Object.entries(a._modal_trigger_types)),e=c.next();!e.done;e=c.next()){var f=$jscomp.makeIterator(e.value);e=f.next().value;f=f.next().value;if("page_load"===e&&f.modal_open_when_others_close){d=!0;break}}if(b&&d){b=!1;for(d=0;d<tdPopupModal.itemsQueue.length;d++)tdPopupModal.itemsQueue[d].uid===a.uid&&(b=!0);b||tdPopupModal.itemsQueue.push(a)}else for(a.modalObj.addClass("tdm-popup-modal-open"),a._is_modal_open=
!0,a._site_scroll||jQuery("body").addClass("tdm-popup-modal-prevent-scroll"),a.modalObj.trigger("tdPopupModal.show"),b=$jscomp.makeIterator(Object.entries(a.closeModals)),d=b.next();!d.done;d=b.next())d=$jscomp.makeIterator(d.value),d.next(),d=d.next().value,tdPopupModal.getItem(d)&&jQuery("#tdm-popup-modal-"+a.closeModals+" .tdm-pmh-close").click()}},modalClose:function(a){a._is_modal_open&&(a.modalObj.removeClass("tdm-popup-modal-open"),a._is_modal_open=!1,a._site_scroll||jQuery("body").removeClass("tdm-popup-modal-prevent-scroll"),
a.modalObj.trigger("tdPopupModal.close"),tdShowVideo._pauseModalPlayers(),tdPopupModal.itemsQueue.length&&tdPopupModal.modalOpen(tdPopupModal.itemsQueue.shift()))},setCookie:function(a,b,d){var c=new Date;c.setTime(c.getTime()+d);d="expires="+c.toUTCString();document.cookie=a+"="+b+";"+d+";path=/"},getCookie:function(a){a+="=";for(var b=decodeURIComponent(document.cookie).split(";"),d=0;d<b.length;d++){for(var c=b[d];" "==c.charAt(0);)c=c.substring(1);if(0==c.indexOf(a))return c.substring(a.length,
c.length)}return""},deleteItem:function(a){for(var b=0;b<tdPopupModal.items.length;b++)if(tdPopupModal.items[b].blockUid===a)return a=jQuery("body"),!tdPopupModal.items[b]._site_scroll&&a.hasClass("tdm-popup-modal-prevent-scroll")&&a.removeClass("tdm-popup-modal-prevent-scroll"),jQuery("#tdm-popup-modal-"+tdPopupModal.items[b].uid).remove(),tdPopupModal.items.splice(b,1),!0;return!1},resetItems:function(){tdPopupModal.items=[]},loadDelayed:function(a){for(a=0;a<tdPopupModal.items.length;a++){var b=
tdPopupModal.items[a];"ui_delayed"!==b._modal_content_load||b._in_composer||b.modalObj.trigger("ui_delayed_load")}tdPopupModal.ui_events.forEach(function(a){window.removeEventListener(a,tdPopupModal.loadDelayed)})},modalLoadContent:function(a){var b=jQuery.parseJSON(a._modal_content_load_data),d=b.content_source,c=a.modalObj.find(".tdm-pm-body");"custom_code"===d&&c.append(b.content);if("page"===d){var e=b.page_id;jQuery.ajax({type:"POST",url:td_ajax_url,data:{action:"tdb_get_modal_page",pageId:e,
td_res_context_registered_atts:td_res_context_registered_atts},success:function(a,b,d){a=jQuery.parseJSON(a);"undefined"!==typeof a.content&&(jQuery(a.content).appendTo(c),"undefined"!==typeof window.tdAnimationStack&&!0===window.tdAnimationStack.activated&&window.tdAnimationStack.reinit())},error:function(a,b,c){console.group("%c tdPopupModal.modalLoadContent/tdb_get_modal_page: error","color: orangered;");console.log("Post: ",{pageId:e});console.log("Error data: ",{errorThrown:c,textStatus:b,status:void 0!==a.status?a.status:"",MLHttpRequest:a});console.groupEnd()}})}}}})();jQuery(document).ready(function(){tdPopupModal.ui_events.forEach(function(a){window.addEventListener(a,tdPopupModal.loadDelayed,{passive:!0})})});
var tdStickyRow={};
(function(){tdStickyRow={items:[],item:function(){this.rowUid="";this.jQueryObj=void 0;this.position="top";this._is_initialized=!1},init:function(){tdStickyRow.items=[];this._is_running=!1},_initialize_item:function(a){!0!==a._is_initialized&&(a._is_initialized=!0)},addItem:function(a){if("undefined"===typeof a.rowUid)throw"item.rowUid is not defined";tdStickyRow.items.push(a);tdStickyRow._initialize_item(a)},resetItems:function(){jQuery(window).unbind("resize.stickyRowTopResize").unbind("resize.stickyRowBottomResize").unbind("scroll.stickyRowTopScroll");tdStickyRow.items.forEach(function(a){var e=
a.jQueryObj;e.removeClass("tdc-rist-absolute");e.removeAttr("style");jQuery("#"+a.rowUid+"-p").remove()});tdStickyRow.items=[]},manageStickies:function(){var a=[],e=[];tdStickyRow.items.forEach(function(d){"top"===d.position?a.push(d):"bottom"===d.position&&e.push(d)});tdStickyRow.manageStickyTop(a);tdStickyRow.manageStickyBottom(e)},manageStickyTop:function(a){var e=jQuery(window);a.length&&(e.bind("resize.stickyRowTopResize",function(){function d(){a.forEach(function(b){var d=b.rowUid,c=jQuery("#"+
d);if(c.length){var f=jQuery("#"+d+"-p"),g=c.outerHeight();if(0===g){var h=c.clone().css({position:"absolute",top:-1E6,left:-1E6}).appendTo("body");g=h.outerHeight();h.remove()}(f.length?f.offset().top:c.offset().top)<=e.scrollTop()+k?(c.addClass("tdc-rist-top-active"),f.length?f.attr("style","height:"+g+"px"):c.after('<div id="'+d+'-p" class="tdc-row-placeholder" style="height:'+g+'px"></div>'),b=a[jQuery.inArray(b,a)+1],"undefined"!==typeof b&&((c.closest(".td-header-mobile-wrap").length||c.closest(".td-header-mobile-sticky-wrap").length)&&
(b.jQueryObj.closest(".td-header-desktop-wrap").length||b.jQueryObj.closest(".td-header-desktop-sticky-wrap").length)&&(b=a[jQuery.inArray(b,a)+1]),"undefined"!==typeof b&&(f=b.jQueryObj,b=jQuery("#"+b.rowUid+"-p"),f=b.length?b.offset().top:f.offset().top,f-=g,c.offset().top>=f&&(c.addClass("tdc-rist-absolute"),c.css({top:f-jQuery(".tdc-content-wrap").offset().top}))))):(g=a[jQuery.inArray(b,a)-1],c.removeClass("tdc-rist-top-active"),f.remove(),"undefined"!==typeof g&&(c=g.jQueryObj,e.scrollTop()<=
c.offset().top&&(c.removeClass("tdc-rist-absolute"),c.removeAttr("style"))))}})}var k=0;jQuery("body").hasClass("admin-bar")&&782<=jQuery(window).width()&&(k=jQuery("#wpadminbar").height());d();e.bind("scroll.stickyRowTopScroll",d)}),e.resize())},manageStickyBottom:function(a){var e=jQuery(window),d=0;a.reverse();a.length&&(e.bind("resize.stickyRowBottomResize",function(){d=0;a.forEach(function(a){a=a.jQueryObj;var b=a.outerHeight();a.addClass("tdc-rist-bottom-active");a.css("bottom",d);d+=b})}),
e.resize())}}})();
var tdbSearch={};
(function(){tdbSearch={items:[],init:function(){tdbSearch.items=[]},item:function(){this.jqueryObj=this.blockAtts=this.blockUid=void 0;this._is_search_open=!1;this._is_live_search_active=!0;this._last_request_results_count=this._current_selection_index=0;this._first_down_up=!0;this._resultsLimit=void 0;this._openSearchFormClass="";this._is_initialized=this.disable_trigger=this.isSearchFormFull=this.inComposer=!1},_initialize_item:function(a){if(!0!==a._is_initialized){jQuery(document).on("click",function(b){!0===a._is_search_open&&(a.jqueryObj.find("*").find(b.target).length||tdbSearch.hide_search_box(a))});if(!a.disable_trigger)a.jqueryObj.find(".tdb-head-search-btn").on("click",function(b){b.preventDefault();b.stopPropagation();!0===a._is_search_open?tdbSearch.hide_search_box(a):tdbSearch.show_search_box(a)});a._is_live_search_active&&!a.inComposer&&a.jqueryObj.find(".tdb-head-search-form-input").keydown(function(b){if(b.which&&39===b.which||b.keyCode&&39===b.keyCode||b.which&&37===b.which||b.keyCode&&
37===b.keyCode)tdbSearch.set_input_focus(a);else{if(b.which&&13===b.which||b.keyCode&&13===b.keyCode)return b=a.jqueryObj.find(".tdb-aj-cur-element"),0<b.length?window.location=b.find(".entry-title a").attr("href"):jQuery(this).parent().parent().submit(),!1;if(b.which&&40===b.which||b.keyCode&&40===b.keyCode)return tdbSearch.move_prompt_down(a),!1;if(b.which&&38===b.which||b.keyCode&&38===b.keyCode)return tdbSearch.move_prompt_up(a),!1;(b.which&&8===b.which||b.keyCode&&8===b.keyCode)&&1===jQuery(this).val().length&&
a.jqueryObj.find(".tdb-aj-search").empty();tdbSearch.set_input_focus(a);setTimeout(function(){tdbSearch.do_ajax_call(a)},100);return!0}});if(!a.disable_trigger){var c=0<jQuery("."+a.blockUid).parents(".td-header-template-wrap").length;window.tdb_p_autoload_vars.isAjax?c||(a.isSearchFormFull?tdbSearch.searchFormWidth(a,!0,a.inComposer):tdbSearch.searchFormWidth(a,!1,a.inComposer)):a.isSearchFormFull?tdbSearch.searchFormWidth(a,!0,a.inComposer):tdbSearch.searchFormWidth(a,!1,a.inComposer)}a._is_initialized=
!0}},addItem:function(a){if("undefined"===typeof a.blockUid)throw"item.blockUid is not defined";tdbSearch.items.push(a);tdbSearch._initialize_item(a)},deleteItem:function(a){for(var c=0;c<tdbSearch.items.length;c++)if(tdbSearch.items[c].blockUid===a)return tdbSearch.items.splice(c,1),!0;return!1},searchFormWidth:function(a,c,b){function e(){k=-f.left+"px";g.attr("style",g.attr("style")+";left:"+k)}var d=a.jqueryObj,f,h,k,g=d.find(".tdb-drop-down-search");jQuery(window).resize(function(){var a=d.offset().left;
c?(g.attr("style","width: "+jQuery("body").outerWidth()+"px !important; left: -"+a+"px;"),setTimeout(function(){f=d.offset();h=f.left;e();b&&setInterval(function(){f=d.offset();f.left!==h&&(e(),h=f.left)},1E3)},500)):g.attr("style","width: "+jQuery("body").outerWidth()+"px !important;")});a.inComposer&&jQuery(window).resize()},show_search_box:function(a){a.jqueryObj.find(".tdb-drop-down-search").addClass(a._openSearchFormClass);!0!==tdDetect.isIos&&setTimeout(function(){document.querySelector("."+
a.blockUid+" .tdb-head-search-form-input").focus()},200);a._is_search_open=!0},hide_search_box:function(a){a.jqueryObj.find(".tdb-drop-down-search").removeClass(a._openSearchFormClass);a._is_search_open=!1},move_prompt_up:function(a){!0===a._first_down_up?(a._first_down_up=!1,0===a._current_selection_index?a._current_selection_index=a._last_request_results_count-1:a._current_selection_index--):0===a._current_selection_index?a._current_selection_index=a._last_request_results_count:a._current_selection_index--;
tdbSearch._repaintCurrentElement(a)},move_prompt_down:function(a){!0===a._first_down_up?a._first_down_up=!1:a._current_selection_index===a._last_request_results_count?a._current_selection_index=0:a._current_selection_index++;tdbSearch._repaintCurrentElement(a)},set_input_focus:function(a){a._current_selection_index=0;a._first_down_up=!0;a.jqueryObj.find(".tdb-search-form").fadeTo(100,1);a.jqueryObj.find(".td_module_wrap").removeClass("tdb-aj-cur-element")},remove_input_focus:function(a){0!==a._last_request_results_count&&
a.jqueryObj.find(".tdb-head-search-form-input").addClass("tdb-head-search-nofocus")},_repaintCurrentElement:function(a){a.jqueryObj.find(".td_module_wrap").removeClass("tdb-aj-cur-element");a._current_selection_index>a._last_request_results_count-1?(a.jqueryObj.find(".tdb-search-form").fadeTo(100,1),a.jqueryObj.find(".tdb-head-search-form-input").removeClass("tdb-head-search-nofocus")):(tdbSearch.remove_input_focus(a),a.jqueryObj.find(".td_module_wrap").eq(a._current_selection_index).addClass("tdb-aj-cur-element"))},
do_ajax_call:function(a){var c=a.jqueryObj.find(".tdb-head-search-form-input").val();""===c?tdbSearch.set_input_focus(a):tdLocalCache.exist("tdb-"+c)?tdbSearch.process_ajax_response(tdLocalCache.get("tdb-"+c),a):jQuery.ajax({type:"POST",url:td_ajax_url,data:{action:"td_ajax_search",module:"tdb_module_search",atts:a.blockAtts,td_string:c,limit:a._resultsLimit},success:function(b,e,d){tdLocalCache.set("tdb-"+c,b);tdbSearch.process_ajax_response(b,a)},error:function(a,c,d){window.console.log(d)}})},
process_ajax_response:function(a,c){var b=c.jqueryObj.find(".tdb-head-search-form-input").val(),e=c.jqueryObj.find(".tdb-aj-search");""===b?e.empty():(a=jQuery.parseJSON(a),a.td_search_query===b&&(c._current_selection_index=0,c._last_request_results_count=a.td_total_in_list,c._first_down_up=!0,e.html(a.td_data),"undefined"!==typeof window.tdAnimationStack&&!0===window.tdAnimationStack.activated&&(window.tdAnimationStack.check_for_new_items(".tdb-aj-search .td-animation-stack",window.tdAnimationStack.SORTED_METHOD.sort_left_to_right,
!0,!1),window.tdAnimationStack.compute_items(!1))))},hideAllItems:function(){tdbSearch.items.forEach(function(a){tdbSearch.hide_search_box(a)})}}})();jQuery().ready(function(){tdbSearch.init();setTimeout(function(){jQuery(window).resize()},500)});
var tdSmartSidebar={};
(function(){tdSmartSidebar={hasItems:!1,items:[],scroll_window_scrollTop_last:0,tds_snap_menu:tdUtil.getBackendVar("tds_snap_menu"),is_enabled:!0,is_enabled_state_run_once:!1,is_disabled_state_run_once:!1,is_tablet_grid:!1,_view_port_current_interval_index:tdViewport.getCurrentIntervalIndex(),item:function(){this.sidebar_jquery_obj=this.content_jquery_obj="";this.sidebar_height=this.sidebar_bottom=this.sidebar_top=0;this.enabled_on=[!0,!0,!0,!0];this.offset=0;this.is_width_auto=[!1,!1,!1,!1];this.content_bottom=
this.content_top=0;this.sidebar_state="";this.case_3_run_once=this.case_2_run_once=this.case_1_run_once=!1;this.case_3_last_content_height=this.case_3_last_sidebar_height=0;this.case_4_run_once=!1;this.case_4_last_menu_offset=0;this.case_6_run_once=this.case_5_run_once=!1},add_item:function(c){tdSmartSidebar.hasItems=!0;c.sidebar_jquery_obj.prepend('<div class="clearfix"></div>').append('<div class="clearfix"></div>');c.content_jquery_obj.prepend('<div class="clearfix"></div>').append('<div class="clearfix"></div>');
tdSmartSidebar.items.push(c)},td_events_scroll:function(c){if(!1!==tdSmartSidebar.hasItems)if(!1===tdSmartSidebar.is_enabled){if(!1===tdSmartSidebar.is_disabled_state_run_once){tdSmartSidebar.is_disabled_state_run_once=!0;for(var d=0;d<tdSmartSidebar.items.length;d++)tdSmartSidebar.items[d].sidebar_jquery_obj.css({width:"auto",position:"static",top:"auto",bottom:"auto"});tdSmartSidebar.log("smart_sidebar_disabled")}}else window.requestAnimationFrame(function(){""!==tdSmartSidebar.tds_snap_menu&&tdAffix._get_menu_affix_height();
var d="";c!==tdSmartSidebar.scroll_window_scrollTop_last&&(d=c>tdSmartSidebar.scroll_window_scrollTop_last?"down":"up");tdSmartSidebar.scroll_window_scrollTop_last=c;for(var m=jQuery(window).height(),h=c+m,g=0;g<tdSmartSidebar.items.length;g++){var a=tdSmartSidebar.items[g];a.content_top=a.content_jquery_obj.offset().top;a.content_height=a.content_jquery_obj.height();a.content_bottom=a.content_top+a.content_height;a.sidebar_top=a.sidebar_jquery_obj.offset().top;a.sidebar_height=a.sidebar_jquery_obj.height();
a.sidebar_bottom=a.sidebar_top+a.sidebar_height;var f=tdSmartSidebar._view_port_current_interval_index;if(0<a.sidebar_jquery_obj.closest(".td-main-sidebar").length||!a.enabled_on||!1!==a.enabled_on[f]){var l="undefined"!==typeof window.tdThemeName?window.tdThemeName:"",b="Newspaper"===l?20:0;if("Newspaper"===l)if(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$/.test(a.offset)){var e=JSON.parse(atob(a.offset));switch(f){case 0:b="undefined"!==typeof e.phone?parseInt(e.phone):
b;break;case 1:b="undefined"!==typeof e.portrait?parseInt(e.portrait):b;break;case 2:b="undefined"!==typeof e.landscape?parseInt(e.landscape):b;break;case 3:b="undefined"!==typeof e.all?parseInt(e.all):b}}else b=a.offset;f=b;jQuery("body").hasClass("admin-bar")&&(f=0<tdSmartSidebar._view_port_current_interval_index?f+32:f);b=c+f;if(a.content_height<=a.sidebar_height)a.sidebar_state="case_6_content_too_small";else if(a.sidebar_height<m)e=a.content_top,tdAffix.is_menu_affix||"undefined"===typeof window.tdThemeName||
"Newsmag"!==window.tdThemeName||"smart_snap_always"!==tdAffix.tds_snap_menu||(e+=f),tdSmartSidebar._is_smaller_or_equal(b,e)?a.sidebar_state="case_2_top_of_content":!0===tdSmartSidebar._is_smaller(a.sidebar_bottom,b)?tdSmartSidebar._is_smaller(b,a.content_bottom-a.sidebar_height)?a.sidebar_state="case_4_fixed_up":a.sidebar_state="case_3_bottom_of_content":tdSmartSidebar._is_smaller_or_equal(a.content_bottom,a.sidebar_bottom)?"up"===d&&tdSmartSidebar._is_smaller_or_equal(b,a.sidebar_top)?a.sidebar_state=
"case_4_fixed_up":a.sidebar_state="case_3_bottom_of_content":a.sidebar_state=a.content_bottom-b>=a.sidebar_height?"case_4_fixed_up":"case_3_bottom_of_content";else if(!0===tdSmartSidebar._is_smaller(a.sidebar_bottom,b)?!0===tdSmartSidebar._is_smaller_or_equal(b,a.sidebar_top)&&!0===tdSmartSidebar._is_smaller_or_equal(a.content_top,b)?a.sidebar_state="case_4_fixed_up":!0===tdSmartSidebar._is_smaller(a.sidebar_bottom,h)&&!0===tdSmartSidebar._is_smaller(a.sidebar_bottom,a.content_bottom)&&a.content_bottom>=
h?a.sidebar_state="case_1_fixed_down":a.sidebar_state="case_3_bottom_of_content":!0===tdSmartSidebar._is_smaller(a.sidebar_bottom,h)&&!0===tdSmartSidebar._is_smaller(a.sidebar_bottom,a.content_bottom)&&"down"===d&&a.content_bottom>=h?a.sidebar_state="case_1_fixed_down":!0===tdSmartSidebar._is_smaller_or_equal(a.sidebar_top,a.content_top)&&"up"===d&&a.content_bottom>=h?a.sidebar_state="case_2_top_of_content":!0===tdSmartSidebar._is_smaller_or_equal(a.content_bottom,a.sidebar_bottom)&&"down"===d||a.content_bottom<
h?a.sidebar_state="case_3_bottom_of_content":!0===tdSmartSidebar._is_smaller_or_equal(b,a.sidebar_top)&&"up"===d&&!0===tdSmartSidebar._is_smaller_or_equal(a.content_top,b)?a.sidebar_state="case_4_fixed_up":"up"===d&&!0===tdSmartSidebar._is_smaller_or_equal(h,a.sidebar_top)&&(a.sidebar_state="case_2_top_of_content"),"case_1_fixed_down"===a.sidebar_state&&"up"===d||"case_4_fixed_up"===a.sidebar_state&&"down"===d)a.sidebar_state="case_5_absolute";b=0;if(null!==tdViewport.getCurrentIntervalItem()){e=
a.sidebar_jquery_obj.parent(".vc_column, .td-main-sidebar, .vc_column-inner, .vc_column_inner");var k=e.find(".td-sticky-sidebar-placeholder");"Newspaper"===l?!0===a.is_width_auto[tdSmartSidebar._view_port_current_interval_index]?(a.sidebar_jquery_obj.css("width",""),k.length&&k.css("width",""),b=a.sidebar_jquery_obj.width(),k.length?k.css("width",b):e.prepend('<div class="td-sticky-sidebar-placeholder" style="width:'+b+'px"></div>')):(b=e.width(),k.length&&k.remove()):b=e.width();a.sidebar_jquery_obj.width(b)}switch(a.sidebar_state){case "case_1_fixed_down":if(!0===a.case_1_run_once)break;tdSmartSidebar.log("sidebar_id: "+g+" "+a.sidebar_state);a.case_1_run_once=!0;a.case_2_run_once=!1;a.case_3_run_once=!1;a.case_4_run_once=!1;a.case_5_run_once=!1;a.case_6_run_once=!1;a.sidebar_jquery_obj.css({width:b,position:"fixed",top:"auto",bottom:"0","z-index":"1"});break;case "case_2_top_of_content":if(!0===a.case_2_run_once)break;tdSmartSidebar.log("sidebar_id: "+g+" "+a.sidebar_state);a.case_1_run_once=!1;a.case_2_run_once=!0;a.case_3_run_once=!1;a.case_4_run_once=
!1;a.case_5_run_once=!1;a.case_6_run_once=!1;a.sidebar_jquery_obj.css({width:"auto",position:"static",top:"auto",bottom:"auto"});break;case "case_3_bottom_of_content":if(!0===a.case_3_run_once&&a.case_3_last_sidebar_height===a.sidebar_height&&a.case_3_last_content_height===a.content_height)break;tdSmartSidebar.log("sidebar_id: "+g+" "+a.sidebar_state);a.case_1_run_once=!1;a.case_2_run_once=!1;a.case_3_run_once=!0;a.case_3_last_sidebar_height=a.sidebar_height;a.case_3_last_content_height=a.content_height;
a.case_4_run_once=!1;a.case_5_run_once=!1;a.case_6_run_once=!1;a.sidebar_jquery_obj.css({width:b,position:"absolute",top:a.content_bottom-a.sidebar_height-a.content_top,bottom:"auto"});break;case "case_4_fixed_up":if(!0===a.case_4_run_once&&a.case_4_last_menu_offset===f)break;tdSmartSidebar.log("sidebar_id: "+g+" "+a.sidebar_state);a.case_1_run_once=!1;a.case_2_run_once=!1;a.case_3_run_once=!1;a.case_4_run_once=!0;a.case_4_last_menu_offset=f;a.case_5_run_once=!1;a.case_6_run_once=!1;a.sidebar_jquery_obj.css({width:b,
position:"fixed",top:f,bottom:"auto"});break;case "case_5_absolute":if(!0===a.case_5_run_once)break;tdSmartSidebar.log("sidebar_id: "+g+" "+a.sidebar_state);a.case_1_run_once=!1;a.case_2_run_once=!1;a.case_3_run_once=!1;a.case_4_run_once=!1;a.case_5_run_once=!0;a.case_6_run_once=!1;a.sidebar_jquery_obj.css({width:b,position:"absolute",top:a.sidebar_top-a.content_top,bottom:"auto"});break;case "case_6_content_too_small":!0!==a.case_6_run_once&&(tdSmartSidebar.log("sidebar_id: "+g+" "+a.sidebar_state),
a.case_1_run_once=!1,a.case_2_run_once=!1,a.case_3_run_once=!1,a.case_4_run_once=!1,a.case_5_run_once=!1,a.case_6_run_once=!0,a.sidebar_jquery_obj.css({width:"auto",position:"static",top:"auto",bottom:"auto"}))}}else a.sidebar_jquery_obj.css({width:"auto",position:"static",top:"auto",bottom:"auto"})}})},compute:function(){tdSmartSidebar.td_events_scroll(jQuery(window).scrollTop())},reset_run_once_flags:function(){for(var c=0;c<tdSmartSidebar.items.length;c++)tdSmartSidebar.items[c].case_1_run_once=
!1,tdSmartSidebar.items[c].case_2_run_once=!1,tdSmartSidebar.items[c].case_3_run_once=!1,tdSmartSidebar.items[c].case_3_last_sidebar_height=0,tdSmartSidebar.items[c].case_3_last_content_height=0,tdSmartSidebar.items[c].case_4_run_once=!1,tdSmartSidebar.items[c].case_4_last_menu_offset=0,tdSmartSidebar.items[c].case_5_run_once=!1,tdSmartSidebar.items[c].case_6_run_once=!1},td_events_resize:function(){tdSmartSidebar._view_port_current_interval_index=tdViewport.getCurrentIntervalIndex();switch(tdSmartSidebar._view_port_current_interval_index){case 0:tdSmartSidebar.is_enabled=
!1;tdSmartSidebar.is_enabled_state_run_once=!1;break;case 1:!1===tdSmartSidebar.is_tablet_grid&&(tdSmartSidebar.reset_run_once_flags(),tdSmartSidebar.is_tablet_grid=!0,tdSmartSidebar.is_desktop_grid=!1,tdSmartSidebar.log("view port tablet"));tdSmartSidebar.is_enabled=!0;tdSmartSidebar.is_disabled_state_run_once=!1;!1===tdSmartSidebar.is_enabled_state_run_once&&(tdSmartSidebar.is_enabled_state_run_once=!0,tdSmartSidebar.log("smart_sidebar_enabled"));break;case 2:case 3:!0===tdSmartSidebar.is_tablet_grid&&
(tdSmartSidebar.reset_run_once_flags(),tdSmartSidebar.is_tablet_grid=!1,tdSmartSidebar.is_desktop_grid=!0,tdSmartSidebar.log("view port desktop")),tdSmartSidebar.is_enabled=!0,tdSmartSidebar.is_disabled_state_run_once=!1,!1===tdSmartSidebar.is_enabled_state_run_once&&(tdSmartSidebar.is_enabled_state_run_once=!0,tdSmartSidebar.log("smart_sidebar_enabled"))}tdSmartSidebar.compute()},log:function(c){},_is_smaller_or_equal:function(c,d){return 1<=Math.abs(c-d)?c<d?!0:!1:!0},_is_smaller:function(c,d){return 1<=
Math.abs(c-d)?c<d?!0:!1:!1}}})();
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(b){var a=0;return function(){return a<b.length?{done:!1,value:b[a++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var a="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return a?a.call(b):$jscomp.arrayIterator(b)};var tdReadingProgressBar={};jQuery(window).on("load",function(){tdReadingProgressBar.init()});
(function(){tdReadingProgressBar={items:[],item:function(){this.barPosition=this.blockUid="";this._is_initialized=!1},init:function(){tdReadingProgressBar.items=[];this._is_running=!1},_initialize_item:function(b){!0!==b._is_initialized&&(b._is_initialized=!0)},createFixedBar:function(b,a,c){c=void 0===c?0:c;var f=b.barPosition,d=jQuery("#td-srp-fixed-wrap"),g=jQuery(".td-srp-"+f+'[data-article-index="'+a+'"]');d.length||(jQuery("body").prepend('<div id="td-srp-fixed-wrap"></div>'),d=jQuery("#td-srp-fixed-wrap"));
g.length||d.append('<div id="'+b.blockUid+'_b" class="td-srp-bar td-srp-'+f+'" data-article-index="'+a+'"><div class="td-srp-bar-fill" '+(0<c?'style="width:'+c+'%"':"")+"></div></div>")},calculateBarsFill:function(){var b=tdReadingProgressBar.items;if(b.length){var a=function(b,n){var a=this,c;return function(q){for(var d=[],e=0;e<arguments.length;++e)d[e-0]=arguments[e];clearTimeout(c);c=setTimeout(function(){b.apply(a,d)},n)}},c=jQuery(window),f=jQuery("#wpadminbar"),d=[],g=jQuery(".tdc-content-wrap").find("article");
g.length&&d.push(jQuery(g[0]));(new MutationObserver(function(b){b=$jscomp.makeIterator(b);for(var a=b.next();!a.done;a=b.next())if(a=a.value,"childList"===a.type){var c=a.addedNodes;if(c.length){a={};c=$jscomp.makeIterator(c);for(var k=c.next();!k.done;a={$jscomp$loop$prop$addedNode$4:a.$jscomp$loop$prop$addedNode$4},k=c.next())if(a.$jscomp$loop$prop$addedNode$4=k.value,a.$jscomp$loop$prop$addedNode$4.classList.contains("tdb-infinte-post-iframe")){var f=d.push(jQuery(a.$jscomp$loop$prop$addedNode$4))-
1;jQuery(a.$jscomp$loop$prop$addedNode$4).on("load",function(a){return function(){jQuery(a.$jscomp$loop$prop$addedNode$4).contents().find(".td-srp-inline").attr("data-article-index",f)}}(a))}}}})).observe(document.querySelector(".tdc-content-wrap"),{childList:!0});c.on("resize",a(function(){var g=c.height(),n=f.length?782<c.width()?f.outerHeight():0:0;c.on("scroll",a(function(){var a=c.scrollTop(),f=a+g;b.forEach(function(b){var c=b.barPosition;d.forEach(function(e,d){var l=Math.floor(e.offset().top)-
n,k=e.outerHeight(),m=l+k;"top"!==c&&"bottom"!==c||tdReadingProgressBar.createFixedBar(b,d);var p=jQuery('.td-srp-bar[data-article-index="'+d+'"] .td-srp-bar-fill'),h;e.hasClass("tdb-infinte-post-iframe")&&(h=e.contents().find('.td-srp-inline[data-article-index="'+d+'"] .td-srp-bar-fill'));a<=l&&m<=f||a>=l&&m<=f&&m>=a?(p.css("width","100%"),"undefined"!==typeof h&&h.css("width","100%")):a>=l&&m>=a?(e=Math.floor((a-l)/(k-g)*100),97<=e&&(e=100),p.css("width",e+"%"),"undefined"!==typeof h&&h.css("width",
e+"%")):(p.css("width","0"),"undefined"!==typeof h&&h.css("width","0"))})})},50));c.scroll()},100));c.resize()}},addItem:function(b){if("undefined"===typeof b.blockUid)throw"item.uid is not defined";tdReadingProgressBar.items.push(b);tdReadingProgressBar._initialize_item(b)},deleteItem:function(b){for(var a=0;a<tdReadingProgressBar.items.length;a++)if(tdReadingProgressBar.items[a].blockUid===b)return jQuery("#"+tdReadingProgressBar.items[a].blockUid+"_b").remove(),tdReadingProgressBar.items.splice(a,
1),!0;return!1},resetItems:function(){tdReadingProgressBar.items=[]}}})();
var tdbTOC={};jQuery().ready(function(){tdbTOC.init()});
(function(){tdbTOC={items:[],item:function(){this.blockObj=this.uid="";this.tocLinks=[];this.headers=[];this.activeLink=this.activeHeader=void 0;this.smoothScroll=!0;this.scrollOffset=0;this.scrollDuration=500;this.activeHighlight=!0;this._is_initialized=this._is_updating=!1},init:function(){tdbTOC.items=[];this._is_running=!1},addItem:function(a){if("undefined"===typeof a.uid)throw"item.uid is not defined";tdbTOC.items.push(a);tdbTOC._initialize_item(a)},deleteItem:function(a){for(var c=0;c<tdbTOC.items.length;c++)if(tdbTOC.items[c].uid===a)return tdbTOC.items.splice(c,1),!0;return!1},resetItems:function(){tdbTOC.items=[]},manageSmoothScroll:function(a){if(a.smoothScroll){var c=jQuery("html, body");jQuery(window);var f=jQuery("body");a.blockObj.on("click","a",function(g){g.preventDefault();a._is_updating=!0;g=jQuery(this).attr("href");var d=tdViewport.getCurrentIntervalIndex(),b=20,e=f.hasClass("admin-bar")?0!==d?32:46:0;if(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$/.test(a.scrollOffset)){var h=
JSON.parse(atob(a.scrollOffset));switch(d){case 0:b="undefined"!==typeof h.phone?parseInt(h.phone):b;break;case 1:b="undefined"!==typeof h.portrait?parseInt(h.portrait):b;break;case 2:b="undefined"!==typeof h.landscape?parseInt(h.landscape):b;break;case 3:b="undefined"!==typeof h.all?parseInt(h.all):b}}else b=parseInt(a.scrollOffset);b+=e;c.animate({scrollTop:jQuery(g).offset().top-b},a.scrollDuration,function(){a._is_updating=!1});window.location.hash=g})}},manageActiveLinks:function(a){if(a.activeHighlight){var c=
jQuery(window);c.scroll(function(){a._is_updating||(requestAnimationFrame(function(){var f=jQuery("body"),g=jQuery(".tdb_single_content"),d=tdViewport.getCurrentIntervalIndex(),b=0;f=f.hasClass("admin-bar")?0!==d?32:46:0;var e=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$/;if(a.smoothScroll)if(b=20,e.test(a.scrollOffset))switch(e=JSON.parse(atob(a.scrollOffset)),d){case 0:b="undefined"!==typeof e.phone?parseInt(e.phone):b;break;case 1:b="undefined"!==typeof e.portrait?
parseInt(e.portrait):b;break;case 2:b="undefined"!==typeof e.landscape?parseInt(e.landscape):b;break;case 3:b="undefined"!==typeof e.all?parseInt(e.all):b}else b=parseInt(a.scrollOffset);b+=f;d=a.headers.findIndex(function(a){return Math.floor(jQuery(a)[0].getBoundingClientRect().top)>=b+1});-1===d?d=a.headers.length-1:0<d&&d--;a.activeHeader=a.headers[d];a.activeLink=a.tocLinks[d];a.activeHeader===a.headers[0]&&c.scrollTop()+b<Math.floor(jQuery(a.activeHeader).offset().top)||a.activeHeader===a.headers[a.headers.length-
1]&&c.scrollTop()>=g.offset().top+g.height()?(jQuery(a.activeLink).hasClass("tdb-toc-active")&&jQuery(a.activeLink).removeClass("tdb-toc-active"),a.activeHeader=void 0,a.activeLink=void 0):(a.tocLinks.each(function(a,b){jQuery(b).removeClass("tdb-toc-active")}),jQuery(a.activeLink).addClass("tdb-toc-active"));a._is_updating=!1}),a._is_updating=!0)})}},_initialize_item:function(a){if(!0!==a._is_initialized){var c=jQuery("body");a.tocLinks=a.blockObj.find("a");a.tocLinks.each(function(f,g){f=c.find(jQuery(g).attr("href"));
f.length&&a.headers.push(f)});a.tocLinks.length!==a.headers.length?tdbTOC.deleteItem(a.uid):(tdbTOC.manageSmoothScroll(a),tdbTOC.manageActiveLinks(a),a._is_initialized=!0)}}}})();
var tdbFavourites={};
(function(){tdbFavourites={selector:".tdb-favorite",cookieId:"tdb_favourites",cookieLifeTime:31536E7,items:[],init:function(){jQuery(tdbFavourites.selector).each(function(b){b=jQuery(b);tdbFavourites.addItem({$obj:b,prodId:b.data("post-id")})});jQuery("body").on("click",tdbFavourites.selector,function(b){b=jQuery(b.currentTarget);var c=b.data("post-id"),a=td_read_site_cookie(tdbFavourites.cookieId),d=0;"undefined"!==typeof a&&null!==a&&(d=a.split(",").filter(Boolean).length);jQuery(tdbFavourites.selector+
'[data-post-id="'+c+'"]').toggleClass("tdb-favorite-selected");var e=b.hasClass("tdb-favorite-selected");e?("undefined"!==typeof a&&null!==a?(a=a.split(","),-1===a.indexOf(c.toString())&&(a.push(c),td_set_cookies_life([tdbFavourites.cookieId,a.join(","),tdbFavourites.cookieLifeTime]))):td_set_cookies_life([tdbFavourites.cookieId,c,tdbFavourites.cookieLifeTime]),d++):("undefined"!==typeof a&&null!==a&&(a=a.split(","),c=a.indexOf(c.toString()),-1<c&&a.splice(c,1),td_set_cookies_life([tdbFavourites.cookieId,
a.join(","),tdbFavourites.cookieLifeTime])),d--);a=jQuery(".tdb-wmf-count");a.length&&a.text(d);"function"===typeof window.matchMedia&&window.matchMedia("(max-width: 767px)").matches&&!e&&(d=b.clone(!1),d.removeClass("tdb-favorite-selected"),b.replaceWith(d))}).on("click",'.td-del-book-btn[data-bookmark-type="tdb"]',function(b){b.preventDefault();b=td_read_site_cookie(tdbFavourites.cookieId);"undefined"!==typeof b&&null!==b&&(td_delete_site_cookie(tdbFavourites.cookieId),jQuery(tdbFavourites.selector).removeClass("tdb-favorite-selected"),
b=jQuery(".tdb-wmf-count"),b.length&&b.text("0"));location.reload()})},item:function(){},addItem:function(b){var c=new tdbFavourites.item,a=!0;a&&"undefined"!==typeof b.$obj?c.$obj=b.$obj:a=!1;a&&tdbFavourites.items.push(c)}}})();jQuery().ready(function(){tdbFavourites.init()});