"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 {{text}}\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='
Cloud Templates
'+("undefined"!==typeof d&&!0===d?'
Global
':"")+'
Mobile Template
';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='
'+e.template_id+'
"+e.template_title+'
Rename
Duplicate
Delete
'; "undefined"!==typeof d&&!0===d&&(k="","undefined"!==typeof f&&""!==f&&(k='data-global-action="'+f+'"'),h+='
Global
'); h+='
'+(""===e.mobile_template_title?"-":'Yes')+'
';l+=h+"
"}),"undefined"!==typeof d&&!0===d&&(p+='
Global Template
'),e.append(p+k+l)):(e.append(k),e.append('
No cloud templates. Please import one or more templates from Cloud Library.
'));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('Yes')), tdbGetMobileTemplates(d,c))},error:function(a,b,c){}})},htmlInfoContent:"Enter the mobile "+("page"===d?"page":"template")+' name:
', 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('
'),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('Mobile page'+a.val()),tdbGetMobileTemplates("page",b))},error:function(a,b,c){}})}, htmlInfoContent:'Enter the mobile page name:
',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(''),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('Yes')), h.length&&(h.find("a:first").html('Mobile page'+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('Mobile page')))}})}).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('Mobile pageNo 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('
Documentation »
'), 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='
  • Load mobile page from Cloud Library
  • Create blank mobile page
  • ';if(_.isArray(g)&&g.length){var l=!1,m="template";d="";"page"===a&&(m="page",d=c+'
    ');_.each(g,function(c,d,e){d="";_.isUndefined(c.is_current)||(d="tdb-current",l=!0); k+='
    '+c.template_title+'
    '});""!==k&&(g="",l||(g="tdb-current",l= !0),k=d+'
    No mobile '+m+"
    "+k);""!==k&&(e.html('
    '+k+'
    Documentation »'), 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+'
    No mobile page, please import or create a new mobile page.
    Documentation »
    '): 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()}}); function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(e){(window.FooGallery=window.FooGallery||{}).$=e}(jQuery),function(e){e?function(){try{return window.FooGallery.utils}catch(e){}}()||(window.FooGallery.utils={$:e,version:"1.0.0"}):console.warn("jQuery must be included in the page prior to the FooGallery.utils library.")}(jQuery),function(t,n){"1.0.0"===n.version&&(n.is={},n.is.array=function(e){return"[object Array]"===Object.prototype.toString.call(e)},n.is.boolean=function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},n.is.element=function(e){return"object"===("undefined"==typeof HTMLElement?"undefined":_typeof(HTMLElement))?e instanceof HTMLElement:!!e&&"object"===_typeof(e)&&1===e.nodeType&&"string"==typeof e.nodeName},n.is.empty=function(e){if(n.is.undef(e)||null===e)return!0;if(n.is.number(e)&&0===e)return!0;if(n.is.boolean(e)&&!1===e)return!0;if(n.is.string(e)&&0===e.length)return!0;if(n.is.array(e)&&0===e.length)return!0;if(n.is.jq(e)&&0===e.length)return!0;if(n.is.hash(e)){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}return!1},n.is.error=function(e){return"[object Error]"===Object.prototype.toString.call(e)},n.is.fn=function(e){return e===window.alert||"[object Function]"===Object.prototype.toString.call(e)},n.is.hash=function(e){return n.is.object(e)&&e.constructor===Object&&!e.nodeType&&!e.setInterval},n.is.jq=function(e){return!n.is.undef(t)&&e instanceof t},n.is.number=function(e){return"[object Number]"===Object.prototype.toString.call(e)&&!isNaN(e)},n.is.object=function(e){return"[object Object]"===Object.prototype.toString.call(e)&&!n.is.undef(e)&&null!==e},n.is.promise=function(e){return n.is.object(e)&&n.is.fn(e.then)&&n.is.fn(e.promise)},n.is.size=function(e){return!!(n.is.string(e)&&!n.is.empty(e)||n.is.number(e))&&/^(auto|none|(?:[\d.]*)+?(?:%|px|mm|q|cm|in|pt|pc|em|ex|ch|rem|vh|vw|vmin|vmax)?)$/.test(e)},n.is.string=function(e){return"[object String]"===Object.prototype.toString.call(e)},n.is.undef=function(e){return void 0===e})}(FooGallery.utils.$,FooGallery.utils),function(l,c,u){var a;"1.0.0"===c.version&&(c.fn={},a=Function.prototype.toString,c.fn.CONTAINS_SUPER=/xyz/.test(a.call(function(){xyz}))?/\b_super\b/:/.*/,c.fn.noop=function(){},c.fn.addOrOverride=function(e,t,n){var i,r,o,s;u.object(e)&&u.string(t)&&!u.empty(t)&&u.fn(n)&&(i=e[t],r=u.fn(i)&&c.fn.CONTAINS_SUPER.test(a.call(n)),e[t]=r?(o=i,s=n,function(){var e=this._super,t=(this._super=o,s.apply(this,arguments));return this._super=e,t}):n)},c.fn.expose=function(t,n,e,i){u.object(t)&&u.object(n)&&u.array(e)&&(i=u.undef(i)?t:i,e.forEach(function(e){u.string(e)&&u.fn(t[e])&&(n[e]=t[e].bind(i))}))},c.fn.apply=function(e,t){return t.unshift(e),new(Function.prototype.bind.apply(e,t))},c.fn.arg2arr=function(e){return Array.prototype.slice.call(e)},c.fn.debounce=function(n,i){var r;return function(){var e=this,t=c.fn.arg2arr(arguments);clearTimeout(r),r=setTimeout(function(){n.apply(e,t)},i)}},c.fn.throttle=function(n,i){var r,o;return function(){var e=this,t=c.fn.arg2arr(arguments);r?(clearTimeout(o),o=setTimeout(function(){Date.now()-r>=i&&(n.apply(e,t),r=Date.now())},i-(Date.now()-r))):(n.apply(e,t),r=Date.now())}},c.fn.resolved=l.Deferred().resolve().promise(),c.fn.rejected=l.Deferred().reject().promise(),c.fn.reject=function(e,t){var n=l.Deferred(),i=c.fn.arg2arr(arguments);return n.reject.apply(n,i).promise()},c.fn.resolve=function(e,t){var n=l.Deferred(),i=c.fn.arg2arr(arguments);return n.resolve.apply(n,i).promise()},c.fn.rejectWith=function(e,t,n){var i=l.Deferred(),r=c.fn.arg2arr(arguments);return r.shift(),i.rejectWith(e,r).promise()},c.fn.resolveWith=function(e,t,n){var i=l.Deferred(),r=c.fn.arg2arr(arguments);return r.shift(),i.resolveWith(e,r).promise()},c.fn.all=function(t){var n=l.Deferred(),i=[];if(u.array(t)&&0e.length)&&e.slice(e.length-t.length)===t},a.str.startsWith=function(e,t){return!l.empty(e)&&!l.empty(t)&&e.slice(0,t.length)===t},a.str.escapeRegExp=function(e){return l.string(e)?e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"):e},a.str.fnv1a=function(e){if(!l.string(e)||l.empty(e))return null;for(var t=2166136261,n=0,i=e.length;n>>0},a.str.from=function(e,t){return a.str.contains(e,t)?e.substring(e.indexOf(t)+t.length):null},a.str.join=function(e,t,n){if(!l.string(e)||!l.string(t))return null;var i=c.arg2arr(arguments);e=i.shift();for(var r=i.shift(),o=0,s=i.length;ot?e.substr(0,t)+(a.string(n)?n:"…"):e},e.getResizeObserverSize=function(e){var t,e=e.contentBoxSize?(e.contentBoxSize[0]?(t=e.contentBoxSize[0].inlineSize,e.contentBoxSize[0]):(t=e.contentBoxSize.inlineSize,e.contentBoxSize)).blockSize:(t=e.contentRect.width,e.contentRect.height);return{width:t,height:e}},s.supportsWebP=!1;var n=new Image;n.onload=function(){s.supportsWebP=0',"arrow-left":'',"arrow-right":'',maximize:'',expand:'',shrink:'',info:'',comment:'',thumbs:'',cart:'',"circle-close":'',"auto-progress":'',search:'',"exif-aperture":'',"exif-camera":'',"exif-created-timestamp":'',"exif-shutter-speed":'',"exif-focal-length":'',"exif-iso":'',"exif-orientation":''}}},register:function(e,t){return!(a.empty(e)||a.empty(t)||!a.string(e)||!a.hash(t))&&(this.registered[e]=l.extend({},this.registered.default,t),!0)},get:function(e,t){var n=this,i="default",r=l.extend({},n.registered.default),t=(a.string(t)&&"default"!==t?r=l.extend(r,n.registered[i=t]):a.hash(t)&&(i="custom",r=l.extend(r,t)),a.string(e)&&r.hasOwnProperty(e)?r[e].replace(/\[ICON_CLASS]/g,n.className+"-"+e):null),r=[!1,e,i].map(function(e){return!1===e?n.className:n.className+"-"+e}).join(" ");return o(t).addClass(r)},element:function(e,t){const n=this;let i="default",r=l.extend({},n.registered.default);a.string(t)&&"default"!==t?(i=t,r=l.extend(r,n.registered[t])):a.hash(t)&&(i="custom",r=l.extend(r,t));t=a.string(e)&&r.hasOwnProperty(e)?r[e].replace(/\[ICON_CLASS]/g,n.className+"-"+e):null;if(null!==t){const o=document.createRange().createContextualFragment(t),s=o.querySelector("svg");if(s)return["","-"+e,"-"+i].forEach(function(e){s.classList.add(n.className+e)}),s}return null}}),e.icons=new e.Icons}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.obj),function(r,n,i,o,s){var a="__FooGallerySwipe__",e="ontouchstart"in window,l=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled&&!e,c=(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&!e,u=e||c;n.Swipe=i.Class.extend({construct:function(e,t){var n=this,i=".fgswipe";n.$el=r(e),n.opt=s.extend({threshold:20,allowPageScroll:!1,swipe:r.noop,data:{}},t),n.active=!1,n.startPoint=null,n.endPoint=null,n.events={start:(u?c?l?"MSPointerDown":"pointerdown":"touchstart":"mousedown")+i,move:(u?c?l?"MSPointerMove":"pointermove":"touchmove":"mousemove")+i,end:(u?c?l?"MSPointerUp":"pointerup":"touchend":"mouseup")+i,leave:(!u||c?"mouseleave":null)+i}},init:function(){var e=this;e.$el.on(e.events.start,{self:e},e.onStart),e.$el.on(e.events.move,{self:e},e.onMove),e.$el.on(e.events.end,{self:e},e.onEnd),o.string(e.events.leave)&&e.$el.on(e.events.leave,{self:e},e.onEnd),e.$el.data(a,e)},destroy:function(){var e=this;e.$el.off(e.events.start,e.onStart),e.$el.off(e.events.move,e.onMove),e.$el.off(e.events.end,e.onEnd),o.string(e.events.leave)&&e.$el.off(e.events.leave,e.onEnd),e.$el.removeData(a)},getAngle:function(e,t){e=Math.atan2(e.x-t.x,e.y-t.y),t=Math.round(180*e/Math.PI);return 360-(t<0?360-Math.abs(t):t)},getDistance:function(e,t){var n=t.x-e.x,t=t.y-e.y;return n*=n,t*=t,Math.sqrt(n+t)},getDirection:function(e,t){e=this.getAngle(e,t);return 337.5",{id:this.id,class:this.cls.container}).addClass(this.opt.classes)},createChildren:function(){return i()},destroy:function(t){var n=this,e=n._super.bind(n);return n.destroyed?a.resolved:(n.destroying=!0,i.Deferred(function(e){n.initializing&&s.promise(n._initialize)?n._initialize.always(function(){n.destroying=!1,n.doDestroy(t),e.resolve()}):(n.destroying=!1,n.doDestroy(t),e.resolve())}).then(function(){e()}).promise())},doDestroy:function(e){var t=this;t.destroyed||(t.trigger("destroy"),t.robserver.disconnect(),i(window).off(t.namespace),t.state.destroy(e),t.filter&&t.filter.destroy(),t.pages&&t.pages.destroy(),t.items.destroy(),s.empty(t.opt.on)||t.$el.off(t.opt.on),t.trigger("destroyed"),t.$el.removeData(r.DATA_TEMPLATE),s.empty(t._undo.classes)?t.$el.removeAttr("class"):t.$el.attr("class",t._undo.classes),s.empty(t._undo.style)?t.$el.removeAttr("style"):t.$el.attr("style",t._undo.style),t._undo.children&&t.destroyChildren(),t._undo.create&&t.$el.remove(),t.$el=t.state=t.items=t.pages=null,t.destroyed=!0,t.initializing=!1,t.initialized=!1)},destroyChildren:function(){},getAvailable:function(){return(this.pages||this.items).available()},layout:function(e){var t=this;null===t._initialize||0===(e=s.number(e)?e:t.el.getBoundingClientRect().width)||t._checkWidth(e)||(t.lastWidth=e,t.trigger("layout",[e]))},_checkWidth:function(e){var t,n=this;return(t=-1!==n._layoutWidths.indexOf(e))||(n._layoutWidths.unshift(e),n._layoutWidths.splice(2,n._layoutWidths.length-2),null!=n._layoutTimeout&&clearTimeout(n._layoutTimeout),n._layoutTimeout=setTimeout(function(){n._layoutWidths.splice(0,n._layoutWidths.length)},100)),t},getCSSClass:function(e,t){t=s.empty(t)?"":t;var e=e instanceof RegExp?e:s.string(e)&&this.opt.regex.hasOwnProperty(e)?this.opt.regex[e]:null,n=this.$el.prop("className")||"",n=null!=e?n.match(e):null;return null!=n&&2<=n.length?n[1]:t},onWindowPopState:function(e){var t=e.data.self,e=e.originalEvent.state;s.empty(e)||e.id!==t.id||t.state.set(e)}}),r.template.register("core",r.Template,{id:null,type:"core",classes:"",on:{},lazy:!0,items:[],scrollParent:null,delay:0,throttle:50,shortpixel:!1,srcset:"data-srcset-fg",src:"data-src-fg",protected:!1,template:{},regex:{theme:/(?:\s|^)(fg-(?:light|dark|custom))(?:\s|$)/,loadingIcon:/(?:\s|^)(fg-loading-(?:default|bars|dots|partial|pulse|trail))(?:\s|$)/,hoverIcon:/(?:\s|^)(fg-hover-(?:zoom|zoom2|zoom3|plus|circle-plus|eye|external|tint))(?:\s|$)/,videoIcon:/(?:\s|^)(fg-video-(?:default|1|2|3|4))(?:\s|$)/,border:/(?:\s|^)(fg-border-(?:thin|medium|thick))(?:\s|$)/,hoverColor:/(?:\s|^)(fg-hover-(?:colorize|grayscale))(?:\s|$)/,hoverScale:/(?:\s|^)(fg-hover-scale)(?:\s|$)/,stickyVideoIcon:/(?:\s|^)(fg-video-sticky)(?:\s|$)/,insetShadow:/(?:\s|^)(fg-shadow-inset-(?:small|medium|large))(?:\s|$)/,filter:/(?:\s|^)(fg-filter-(?:1977|amaro|brannan|clarendon|earlybird|lofi|poprocket|reyes|toaster|walden|xpro2|xtreme))(?:\s|$)/}},{container:"foogallery"},{},-100)}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.str),function(e,t){e.Component=t.EventClass.extend({construct:function(e){this._super(),this.tmpl=e},destroy:function(){this.tmpl=null,this._super()}}),e.components=new e.Factory}(FooGallery,FooGallery.utils,FooGallery.utils.is),function(t,o,n,s,a,l){o.State=o.Component.extend({construct:function(e){var t=this,e=(t._super(e),t.apiEnabled=!!window.history&&!!history.replaceState,t.opt=t.tmpl.opt.state,t.enabled=t.opt.enabled,t.current={filter:[],page:0,item:null},t.pushOrReplace=t.isPushOrReplace(t.opt.pushOrReplace)?t.opt.pushOrReplace:"replace",t.defaultMask="foogallery-gallery-{id}",a.escapeRegExp(t.tmpl.id)),n=a.escapeRegExp(t.getMasked()),i=a.escapeRegExp(t.opt.values),r=a.escapeRegExp(t.opt.pair);t.regex={exists:new RegExp("^#"+e+"\\"+i+".+?"),masked:new RegExp("^#"+n+"\\"+i+".+?"),values:new RegExp("(\\w+)"+r+"([^"+i+"]+)","g")},t.usePopState=t.opt.usePopState,t.onPopState=t.onPopState.bind(t)},init:function(){var e=this;e.set(e.initial()),e.enabled&&e.apiEnabled&&e.usePopState&&window.addEventListener("popstate",e.onPopState)},destroy:function(e){var t=this;t.enabled&&t.apiEnabled&&t.usePopState&&window.removeEventListener("popstate",t.onPopState),e||t.clear(),t.opt=t.regex={},t._super()},getIdNumber:function(){return this.tmpl.id.match(/\d+/g)[0]},getMasked:function(){var e=a.contains(this.opt.mask,"{id}")?this.opt.mask:this.defaultMask;return a.format(e,{id:this.getIdNumber()})},isPushOrReplace:function(e){return-1!==n.inArray(e,["push","replace"])},exists:function(){return this.regex.values.lastIndex=0,(this.regex.exists.test(location.hash)||this.regex.masked.test(location.hash))&&this.regex.values.test(location.hash)},parse:function(){var e,r=this,o=r.tmpl,s={};return r.exists()&&(r.enabled?(s.id=r.tmpl.id,r.regex.values.lastIndex=0,e=location.hash.match(r.regex.values),t.each(e,function(e,t){var n,i=t.split(r.opt.pair);if(2===i.length)switch(i[0]){case r.opt.itemKey:null!==(n=o.items.fromHash(i[1]))&&(s.item=n);break;case r.opt.pageKey:o.pages&&null!==(n=o.pages.fromHash(i[1]))&&(s.page=n);break;case r.opt.filterKey:o.filter&&null!==(n=o.filter.fromHash(i[1]))&&(s.filter=n)}})):r.apiEnabled?history.replaceState(null,"",location.pathname+location.search):location.hash="#"),s},hashify:function(e){var t,n,i=this,r=i.tmpl;return s.hash(e)?(t=[],null!==(n=r.items.toHash(e.item))&&t.push(i.opt.itemKey+i.opt.pair+n),r.filter&&null!==(n=r.filter.toHash(e.filter))&&t.push(i.opt.filterKey+i.opt.pair+n),r.pages&&null!==(n=r.pages.toHash(e.page))&&t.push(i.opt.pageKey+i.opt.pair+n),0",{class:[n.pages.cls.container,n.pages.theme].join(" ")}),!0},destroy:function(){var e=this;e._containerExisted?e.$container.empty().removeClass().addClass(e._placeholderClasses.join(" ")):e.$container.remove(),e.$container=null},append:function(){var e=this;e._containerExisted||("top"===e.position?e.$container.insertBefore(e.tmpl.$el):e.$container.insertAfter(e.tmpl.$el))},update:function(e){}}),o.paging.register("default",o.Paging,null,{type:"none",theme:"fg-light",size:30,pushOrReplace:"push",position:"none",scrollToTop:!0},{container:"fg-paging-container"},null,-100)}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is),function(l,e,a){e.Dots=e.Paging.extend({}),e.DotsControl=e.PagingControl.extend({construct:function(e,t,n){this._super(e,t,n),this.$list=null,this.$items=null},create:function(){var e=this;if(e._super()){for(var t,n=e.pages.cls,i=e.pages.il8n,r=[],o=l("
      ",{class:n.list}),s=0,a=e.pages.total;s",{class:s.link,href:"#page-"+e}).html(n).on("click.foogallery",{self:this,page:e},this.onLinkClick),e=(a.empty(t)||n.attr("title",t.replace(/\{PAGE}/g,e).replace(/\{LIMIT}/g,o.limit+"")),r=a.string(r)?r:t,a.empty(r)||n.prepend(l("",{class:s.reader,text:r.replace(/\{PAGE}/g,"").replace(/\{LIMIT}/g,o.limit+"")})),l("
    • ",{class:s.item}).append(n));return i=a.string(i)?i:"",a.empty(i)||e.addClass(i),e},onLinkClick:function(e){e.preventDefault();var t=e.data.self,e=e.data.page,n=t.pages.sel;l(this).closest(n.item).is(n.disabled)||t.pages.set(e,!0)}}),e.paging.register("dots",e.Dots,e.DotsControl,{type:"dots",position:"both",pushOrReplace:"push"},{list:"fg-dots",item:"fg-dot-item",link:"fg-dot-link",disabled:"fg-disabled",selected:"fg-selected",visible:"fg-visible",reader:"fg-sr-only"},{current:"Current page",page:"Page {PAGE}"})}(FooGallery.$,FooGallery,(FooGallery.utils,FooGallery.utils.is)),function(e){e.DefaultTemplate=e.Template.extend({}),e.template.register("default",e.DefaultTemplate,null,{container:"foogallery fg-default"})}((FooGallery.$,FooGallery),FooGallery.utils),function(e){e.MasonryTemplate=e.Template.extend({construct:function(e,t){var n=this;n._super(e,t),n.masonry=null,n.on({"pre-init":n.onPreInit,destroyed:n.onDestroyed,"appended-items":n.onAppendedItems,"detach-item":n.onDetachItem,"layout after-filter-change":n.onLayoutRequired,"page-change":n.onPageChange},n)},onPreInit:function(){var e=this,t=e.sel,n=e.$el.hasClass("fg-fixed");e.template.isFitWidth=n,e.template.percentPosition=!n,e.template.transitionDuration=0,e.template.itemSelector=t.item.elem,n||(e.template.gutter=t.gutterWidth,e.template.columnWidth=t.columnWidth),e.masonry=new Masonry(e.el,e.template)},onDestroyed:function(){this.masonry instanceof Masonry&&this.masonry.destroy()},onLayoutRequired:function(){this.masonry.layout()},onPageChange:function(e,t,n,i){i||this.masonry.layout()},onAppendedItems:function(e,t){t=t.map(function(e){return e.el}),t=this.masonry.addItems(t);this.masonry.layoutItems(t,!0)},onDetachItem:function(e,t){e.isDefaultPrevented()||(e.preventDefault(),this.masonry.remove(t.el),t.$el.removeClass(this.cls.hidden),t.isAttached=!1)}}),e.template.register("masonry",e.MasonryTemplate,{template:{}},{container:"foogallery fg-masonry",columnWidth:"fg-column-width",gutterWidth:"fg-gutter-width"})}((FooGallery.$,FooGallery),(FooGallery.utils,FooGallery.utils.is)),function(i,r,e,o){r.Justified=e.Class.extend({construct:function(e,t){var n=this;n.tmpl=e,n.$el=e.$el,n.options=i.extend(!0,{},r.Justified.defaults,t),n._items=[],n.maxRowHeight=0,n.borderSize=0,n.align=-1!==["left","center","right"].indexOf(n.options.align)?n.options.align:"center"},init:function(){var e=this;e.maxRowHeight=e.getMaxRowHeight(e.options.maxRowHeight,e.options.rowHeight),e.borderSize=e.getBorderSize()},destroy:function(){this.$el.removeAttr("style")},getBorderSize:function(){switch(this.tmpl.getCSSClass("border","")){case"fg-border-thin":return 4;case"fg-border-medium":return 10;case"fg-border-thick":return 16;default:return 0}},getMaxRowHeight:function(e,t){var n;return o.string(e)?(n=parseInt(e),isNaN(n)?t:n<=0?1/0:-1!==e.indexOf("%")?t*(n/100):n):o.number(e)?e<=0?1/0:e:t},layout:function(e){var n,i=this;0<(e=o.number(e)?e:i.$el.width())&&(0!==(n=i.createRows(e)).height&&0t+2*r.borderSize&&(a=(t+2*r.borderSize)/n.height,n.width=n.width*a,n.height=n.height*a),n.top=i,n.left=0,"left"!==r.align&&n.widtho&&0",{class:e.cls.inner}).append(i("
      ",{class:e.cls.innerContainer}),i("
      ",{class:e.cls.controls}).append(i("
      ",{class:e.cls.prev}).append(i("",{text:e.il8n.prev})),i("