Файловый менеджер - Редактировать - /home/kunzqhe/www/wp-content/themes/themify-ultra/themify/themify-builder/js/editor/themify-constructor.min.js
Ðазад
'use strict';var ThemifyConstructor; (function(p,x,w,h){let l={ActionBar:{}},z="undefined"!==typeof ThemifyBuilderCommon?ThemifyBuilderCommon:{};ThemifyConstructor={data:null,key:"tb_form_templates_",styles:{},settings:{},editors:null,afterRun:[],radioChange:[],bindings:[],stylesData:null,values:{},clicked:null,type:null,static:null,label:null,is_repeat:null,is_sort:null,is_new:null,is_ajax:null,breakpointsReverse:null,set(a){try{let b=themify_vars.version;for(let a in themifyBuilder.modules)b+=a;themifyBuilder.cache_data&&(b+=themifyBuilder.cache_data); localStorage.setItem(this.key,JSON.stringify({val:a,h:x.hash(b)}));return!0}catch(b){return!1}},get(){if(themifyBuilder.debug)return!1;try{let a=localStorage.getItem(this.key),b=themify_vars.version;if(!a)return!1;a=JSON.parse(a);for(let a in themifyBuilder.modules)b+=a;themifyBuilder.cache_data&&(b+=themifyBuilder.cache_data);return a.h!==x.hash(b)?!1:a.val}catch(a){return!1}},getForms(a){if("undefined"!==typeof tb_app){if(void 0!==tb_app.Constructor){for(var b in tb_app.Constructor)ThemifyConstructor[b]= tb_app.Constructor[b];delete tb_app.Constructor}z=ThemifyBuilderCommon;l=tb_app}this.breakpointsReverse=Object.keys(themifyBuilder.breakpoints).reverse();this.breakpointsReverse.push("desktop");const c=this;b=c.get();const d=function(b){z.Lightbox.setup();c.data=b;a&&a()};!1!==b?d(b):function(a){++a;p.ajax({type:"POST",url:themifyBuilder.ajaxurl,dataType:"json",data:{action:"tb_load_form_templates",tb_load_nonce:themifyBuilder.tb_load_nonce,page:a},success(a){a&&(d(a),c.set(a))}})}(0);c.static=themifyBuilder.i18n.options; themifyBuilder.i18n.options=null;this.label=themifyBuilder.i18n.label;themifyBuilder.i18n.label=null;b=c.static.fonts.safe;for(let a=0,d=b.length;a<d;++a)""!==b[a].value&&"default"!==b[a].value&&(c.font_select.safe[b[a].value]=b[a].name);c.static.fonts.safe=null;b=c.static.fonts.google;for(let a=0,d=b.length;a<d;++a)""!==b[a].value&&"default"!==b[a].value&&(c.font_select.google[b[a].value]={n:b[a].name,v:b[a].variant});c.static.fonts.google=b=themifyBuilder.google=null;b=c.static.fonts.cf;for(let a= 0,d=b.length;a<d;++a)""!==b[a].value&&"default"!==b[a].value&&(c.font_select.cf[b[a].value]={n:b[a].name,v:b[a].variant});c.static.fonts.cf=b=themifyBuilder.cf=null},getOptions(a){if(void 0!==a.options)return a.options;for(let b in this.static)if(!0===a[b])return this.static[b];return!1},getTitle(a){return"custom_css"===a.type?this.label.custom_css:"title"===a.type?this.label.m_t:void 0!==a.label?void 0!==this.label[a.label]?this.label[a.label]:a.label:!1},getSwitcher(){const a=h.createElement("ul"), b=this.breakpointsReverse,c=this;a.className="tb_lightbox_switcher tf_clearfix";for(let c=b.length-1;-1<c;--c){let d=b[c],f=h.createElement("li"),g=h.createElement("a");g.href="#"+d;g.className="tab_"+d;g.title="tablet_landscape"===d?this.label.table_landscape:d.charAt(0).toUpperCase()+d.substr(1);g.appendChild(l.Utils.getIcon("ti-"+("tablet_landscape"===d?"tablet":d)));f.appendChild(g);a.appendChild(f)}a.addEventListener("click",function(b){b.preventDefault();b.stopImmediatePropagation();b.target!== a&&(b=b.target.closest("a"),null!==b&&c.lightboxSwitch(b.getAttribute("href")))});return a},lightboxSwitch(a){a=a.replace("#","");a!==l.activeBreakPoint&&(l.activeModel&&"visual"===l.mode&&(l.scrollTo=l.liveStylingInstance.$liveStyledElmt),p(".tb_breakpoint_switcher.breakpoint-"+a,w.document).trigger("click"))},binding(a,b,c,d){let e=!1;var f=b.binding;b=b.type;"select"===b&&0==c&&(c="");c||void 0===f.empty?c&&void 0!==f[c]?e="radio"===b||"icon_radio"===b?!0===a.checked?f[c]:!1:f[c]:c&&void 0!==f.not_empty? e=f.not_empty:void 0!==f.select&&c!==f.select.value?e=f.select:void 0!==f.checked&&!0===a.checked?e=f.checked:void 0!==f.not_checked&&!1===a.checked&&(e=f.not_checked):e=f.empty;if(e){if(void 0===d||null===d||0===d.length)d=a.closest(".tb_tab"),null===d&&(d=a.closest(".tb_expanded_opttions"),null===d&&(d=w.document.getElementById("tb_lightbox_container")));f=void 0!==e.hide;b=void 0!==e.show;const u=this;a=[];const h=function(a,b){let c;const d=Object.keys(a);for(let e=0,f=d.length;e<f;++e){if(void 0!== a[d[e]].id&&a[d[e]].id===b){c=a[d[e]];break}if(a[d[e]]&&"object"===typeof a[d[e]]&&(c=h(a[d[e]],b),void 0!==c))break}return c};c=function(a,b,c){const d=a.dataset.type;let e;"radio"===d?(e=a.querySelector("input:checked"),null===e&&(e=a.getElementsByTagName("input")[0])):"checkbox"===d||"toggle_switch"===d?e=a.getElementsByTagName("input")[0]:"select"===d&&(e=a.getElementsByTagName("select")[0]);void 0!==e&&u.binding(e,b,e.value,c)};!0!==b||Array.isArray(e.show)||(e.show=[e.show]);!0!==f||Array.isArray(e.hide)|| (e.hide=[e.hide]);let n=!0===b?e.show:[];!0===f&&(n=n.concat(e.hide));for(let c=0,u=n.length;c<u;++c){if(!0===f&&void 0!==e.hide[c]){var g=d.querySelectorAll("."+e.hide[c]);for(var k=g.length-1;-1<k;--k)if(g[k].classList.add("_tb_hide_binding"),"object"===typeof this.data&&null!==this.type&&"object"===typeof this.data[this.type]){var m=h(this.data[this.type][this.clicked],n[c]);"object"===typeof m&&"object"===typeof m.binding&&a.push({el:g[k],data:m})}}if(!0===b&&void 0!==e.show[c])for(g=d.querySelectorAll("."+ e.show[c]),k=g.length-1;-1<k;--k)g[k].classList.remove("_tb_hide_binding"),"object"===typeof this.data&&null!==this.type&&"object"===typeof this.data[this.type]&&(m=h(this.data[this.type][this.clicked],n[c]),"object"===typeof m&&"object"===typeof m.binding&&a.push({el:g[k],data:m}))}for(f=a.length-1;-1<f;--f)c(a[f].el,a[f].data,d);if(void 0!==e.responsive&&void 0!==e.responsive.disabled)for(Array.isArray(e.responsive.disabled)||(e.responsive.disabled=[e.responsive.disabled]),c=e.responsive.disabled, a="desktop"!==l.activeBreakPoint,c=c.length-1;-1<c;--c)if(void 0!==e.responsive.disabled[c])for(f=d.querySelectorAll("."+e.responsive.disabled[c]),b=f.length-1;-1<b;--b)f[c].classList.toggle("responsive_disable",a)}},control:{init(a,b,c){c.name=b;this[b].call(this,a,c)},preview(a,b,c){if("visual"===l.mode){const d=ThemifyConstructor;let e=null,f=null;!0===c.repeat&&(f=a.closest(".tb_toggleable_fields"),null===f&&(f=a.closest(".tb_sort_fields_parent"),null===f&&(f=a.closest(".tb_row_js_wrapper")))); if(void 0!==c.selector&&b)if(e=l.liveStylingInstance.$liveStyledElmt[0].querySelectorAll(c.selector),0===e.length)e=null;else if(null!==f){const b=a.closest(".tb_repeatable_field"),d=Array.prototype.slice.call(f.children);void 0!==c.rep?(e=l.liveStylingInstance.$liveStyledElmt[0].querySelectorAll(c.rep),e=e[d.indexOf(b)],void 0!==e?(e=e.querySelectorAll(c.selector),0===e.length&&(e=null)):e=null):e=e.length===d.length-1?e[d.indexOf(b)]:null}null!==f?d.settings[f.id]=l.Utils.clear(l.Forms.parseSettings(f).v): d.settings[c.id]=b;"refresh"===c.type||!0===d.is_ajax?l.activeModel.trigger("custom:preview:refresh",d.settings,e,b):l.activeModel.trigger("custom:preview:live",d.settings,"wp_editor"===c.name||"TEXTAREA"===a.tagName,null,e,b)}else l.activeModel.backendLivePreview();l.hasChanged=!0},change(a,b){let c=this,d="refresh"===b.type&&void 0===b.selector?1E3:50,e;void 0===b.event?(e="change",d=1):e=b.event;a.addEventListener(e,_.throttle(function(a){const d=a.target;if("keyup"===a.type){if(d.value===d.dataset.oldValue)return; d.dataset.oldValue=d.value}c.preview(d,d.value,b)},d),{passive:!0})},wp_editor(a,b){p(".wrap > #message").attr("id","wp-message");let c=this,d=p(a);var e=a.id;let f=!1,g=!1,k=_.throttle(function(e){e="setupeditor"===this.type?this.getContent():this.value;null!==l.activeModel&&f!==e&&(f=e,!1!==g?(a.value=e,d.trigger("change")):c.preview(a,e,b))},"refresh"===b.type&&void 0===b.selector?1E3:50);l.Utils.initQuickTags(e);void 0!==tinyMCE&&(void 0!==tinymce.editors[e]&&tinyMCE.execCommand("mceRemoveEditor", !0,e),e=l.Utils.initNewEditor(e),g=a.classList.contains("wp-editor-area")?0<d.closest("#instance_widget").length:!1,!e.type&&(e.type="setupeditor"),e.on("change keyup",k));d.on("change keyup",k)},layout(a,b){if("visual"===l.mode){const c=this;a.addEventListener("change",function(a){a=a.detail.val;if(void 0!==b.classSelector&&"auto_tiles"!==a){const d=b.id,f=ThemifyConstructor.settings[d],g=""!==b.classSelector?l.liveStylingInstance.$liveStyledElmt.find(b.classSelector).first():l.liveStylingInstance.$liveStyledElmt; ThemifyConstructor.settings[d]=a;0<g.length?(g.removeClass(f).addClass(a),l.Utils.loadContentJs(l.liveStylingInstance.$liveStyledElmt,"module")):c.preview(this,a,b)}else c.preview(this,a,b)},{passive:!0})}},icon(a,b){const c=this;a.addEventListener("change",function(a){const d=a.target.value,f=this.closest(".tb_input").getElementsByClassName("themify_fa_toggle")[0];void 0!==f&&(f.firstChild&&f.firstChild.remove(),d&&f.appendChild(l.Utils.getIcon(d)));c.preview(a.target,d,b)},{passive:!0})},checkbox(a, b){if("visual"===l.mode){const c=this;a.addEventListener("change",function(){const a=[],e=this.closest(".themify-checkbox").getElementsByClassName("tb-checkbox");for(let b=0,c=e.length;b<c;++b)e[b].checked&&a.push(e[b].value);c.preview(this,a.join("|"),b)},{passive:!0})}},color(a,b){if("visual"===l.mode){const c=this;a.addEventListener("themify_builder_color_picker_change",function(a){c.preview(this,a.detail.val,b)},{passive:!0})}},widget_select(a,b){this.preview(a,a.find(":input").themifySerializeObject(), b)},queryPosts(a,b){if("visual"===l.mode){const c=this;a.addEventListener("queryPosts",function(a){b.id=this.id;ThemifyConstructor.settings=l.Utils.clear(l.Forms.serialize("tb_options_setting"));c.preview(this,ThemifyConstructor.settings[b.id],b)},{passive:!0})}}},initControl(a,b){if(null!==l.activeModel){if("setting"===this.clicked&&"custom_css"!==b.type){if(!1!==b.control&&"module"===this.component){const c=b.control||{};let d=b.type;!0===c.repeat?c.id=a.getAttribute("data-input-id"):!0===this.is_repeat? (c.repeat=!0,c.id=a.getAttribute("data-input-id")):c.id=b.id;if(void 0===c.control_type){if(void 0===d||"text"===d||"number"===d||"url"===d||"autocomplete"===d||"range"===d||"radio"===d||"icon_radio"===d||"select"===d||"gallery"===d||"textarea"===d||"address"===d||"image"===d||"date"===d||"audio"===d||"video"===d||"select_menu"===d||"widgetized_select"===d||"layoutPart"===d||"selectSearch"===d||"hidden"===d||"toggle_switch"===d)void 0!==c.event||"text"!==d&&"textarea"!==d||(c.event="keyup"),d="change"}else d= c.control_type;this.control.init(a,d,c)}}else"visual"===l.mode&&"styling"===this.clicked&&l.liveStylingInstance.bindEvents(a,b);if(void 0!==b.binding){const c=this,d=!0===c.is_repeat,e=function(e,g){let f;d&&(f=a.closest(".tb_sort_field_dropdown"),null===f&&(f=a.closest(".tb_toggleable_fields_options"),null===f&&(f=a.closest(".tb_repeatable_field_content"))));c.binding(e,b,g,f)};"layout"===b.type||"frame"===b.type?a.addEventListener("click",function(a){a=a.target.closest(".tfl-icon");null!==a&&e(this, a.id)},{passive:!0}):a.addEventListener("change",function(a){e(this,this.value)},{passive:!0});this.bindings.push({el:a,data:b,repeat:d})}}return a},callbacks(){if(null!==this.afterRun){var a=this.afterRun.length;if(0<a){for(a=0;a<this.afterRun.length;++a)this.afterRun[a].call();this.afterRun=[]}}if(null!==this.radioChange&&(a=this.radioChange.length,0<a)){for(a=0;a<this.radioChange.length;++a)this.radioChange[a].call();this.radioChange=[]}if(null!==this.bindings&&(a=this.bindings.length,0<a)){for(--a;-1< a;--a){let b=this.bindings[a].el,c=!0===this.bindings[a].repeat?b.closest(".tb_repeatable_field_content"):void 0,d="layout"===this.bindings[a].data.type||"frame"===this.bindings[a].data.type?b.getElementsByClassName("selected")[0].id:b.value;!0===this.bindings[a].repeat&&(c=b.closest(".tb_sort_field_dropdown"),null===c&&(c=b.closest(".tb_toggleable_fields_options"),null===c&&(c=b.closest(".tb_repeatable_field_content"))));this.binding(b,this.bindings[a].data,d,c)}this.bindings=[]}},setUpEditors(){for(let a= this.editors.length-1;-1<a;--a)this.initControl(this.editors[a].el,this.editors[a].data);this.editors=[]},switchTabs(a){"A"===this.nodeName&&a.preventDefault();a.stopPropagation();a=this.getAttribute("href");var b=this.parentNode;const c=b.parentNode;var d=c.parentNode;let e=d.querySelector(a);e&&e.parentNode===d||(e=w.document.getElementById(a.replace("#","")));if(e&&!b.classList.contains("current")){var f=c.children;d=e.parentNode.children;for(let a=f.length-1;-1<a;--a)f[a].classList.remove("current"); b.classList.add("current");for(b=d.length-1;-1<b;--b)d[b].classList.contains("tb_tab")&&(d[b].style.display="none");e.style.display="block";x.body.triggerHandler("themify_builder_tabsactive",[a,e]);x.triggerEvent(e,"themify_builder_tabsactive",{id:a});l.Utils.hideOnClick(c)}},run(a,b){this.styles={};this.settings={};this.editors=[];this.afterRun=[];this.radioChange=[];this.bindings=[];this.stylesData={};this.component=this.is_sort=this.is_repeat=null;this.type=a;this.is_ajax=this.is_new=null;let c; var d=!1,e=!1;let f=l.activeModel,g;null!==f?(this.component=f.get("elType"),e=h.getElementsByClassName("tb_element_cid_"+f.cid)[0],"module"===this.component?(this.is_ajax="ajax"===themifyBuilder.modules[a].type,d="mod_settings",void 0!==f.get("is_new")&&(this.is_new=!0,e=e.closest(".module_row"))):d="styling",this.values=p.extend(!0,{},f.get(d)),void 0!==e&&(l.beforeEvent=z.clone(e)),e=void 0!==f.get("visibileClicked"),d=!1===e&&("column"===this.component||"subrow"===this.component||void 0!==f.get("styleClicked")), void 0===this.data[a].visibility&&(this.data[a].visibility=!0),void 0===this.data[a].animation&&(this.data[a].animation=!0),c=this.data[a]):(this.values={},this.component=null,c=a);var k=h.createDocumentFragment();a=h.createDocumentFragment();const m=this;var u={styling:"ti-brush",animation:"ti-layers-alt",visibility:"ti-eye"};const q=function(a,b){const c=h.createElement("div"),d=h.createDocumentFragment();c.className="tb_options_tab_content";if("visibility"===a||"animation"===a)b=m.static[a];else if("styling"=== a){const a=h.createElement("div"),b=l.GS.globalStylesHTML();a.className="tb_styling_tab_header";a.appendChild(m.getSwitcher());b&&a.appendChild(b);d.appendChild(a)}c.appendChild(m.create(b));d.appendChild(c);"styling"===a&&(a=h.createElement("a"),b=h.createElement("i"),a.href="#",a.className="reset-styling",b.className="tf_close",a.appendChild(b),a.appendChild(h.createTextNode(m.label.reset_style)),a.addEventListener("click",m.resetStyling.bind(m)),d.appendChild(a),"visual"===l.mode&&f&&setTimeout(function(){l.liveStylingInstance.module_rules= m.styles},600));b=null;return d};this.clicked=null;for(var n in c){if(!1===c[n])continue;let b=h.createElement("li"),f=h.createElement("a"),g=h.createElement("span"),v=h.createElement("div"),A=void 0!==c[n].name?c[n].name:this.label[n],D="tb_options_"+n;f.href="#"+D;f.textContent=A;"setting"!==n&&(f.className="tb_tooltip",g.textContent=A,u[n]&&f.appendChild(l.Utils.getIcon(u[n])),f.appendChild(g));v.id=D;v.className="tb_tab tb_options_tab_wrapper";if(!0===d&&"styling"===n||!0===e&&"visibility"=== n||!1===d&&!1===e&&"setting"===n||null===this.component)b.className="current",m.clicked=n,void 0!==c[n].html?v.appendChild(c[n].html):v.appendChild(q(n,c[n].options)),v.style.display="block",v.dataset.done=!0;v.addEventListener("themify_builder_tabsactive",function(a){a=a.detail.id.replace("#tb_options_","");m.clicked=a;void 0===this.dataset.done&&(this.dataset.done=!0,this.appendChild(q(a,c[a].options)),m.callbacks(),"setting"===a&&m.setUpEditors())},{passive:!0});f.addEventListener("click",this.switchTabs); a.appendChild(v);b.appendChild(f);k.appendChild(b)}n=z.Lightbox.$lightbox[0].getElementsByClassName("tb_options_tab")[0];for(u=z.Lightbox.$lightbox[0].getElementsByClassName("tb_lightbox_actions_wrap")[0];null!==n.firstChild;)n.removeChild(n.firstChild);for(;null!==u.firstChild;)u.removeChild(u.firstChild);n.appendChild(k);if(void 0!==b||f){const a=h.createElement("button");a.className="builder_button builder_save_button";a.title=void 0!==b&&void 0!==b.ctr_save?this.label[b.ctr_save]:this.label.ctr_save; a.textContent=void 0!==b&&void 0!==b.done?this.label[b.done]:this.label.done;if(f){l.autoSaveCid=f.cid;"visual"===l.mode&&(null!==l.GS.activeGS?(l.liveStylingInstance=l.createStyleInstance(),l.liveStylingInstance.init(null,!0)):(null===l.liveStylingInstance&&(l.liveStylingInstance=l.createStyleInstance()),l.liveStylingInstance.init()),g=l.liveStylingInstance.$liveStyledElmt[0].outerHTML);const c=function(b){b.preventDefault();b.stopImmediatePropagation();m.saveComponent(!1)&&(a.removeEventListener("click", c),d.removeEventListener("click",c,{once:!0}))},d=h.createElement("a");b=h.createElement("li");k=h.createElement("span");b.className="tb_top_save_btn";d.className="tb_tooltip";k.textContent=this.label.done;d.appendChild(l.Utils.getIcon("ti-check"));d.appendChild(k);b.appendChild(d);n.appendChild(b);a.addEventListener("click",c);d.addEventListener("click",c,{once:!0})}u.appendChild(a)}x.body.one("themify_builder_lightbox_close",function(){m.radioChange=m.bindings=m.stylesData=m.is_ajax=m.is_repeat= m.is_sort=m.afterRun=m.editors=m.clicked=m.settings=m.styles=null;if(f){var a;m.is_new&&"module"===l.activeModel.get("elType")&&(a=("visual"===l.mode?l.liveStylingInstance.$liveStyledElmt:x.body.find(".tb_element_cid_"+l.activeModel.cid)).closest(".module_row.tb_new_row"));if(!0!==l.saving&&void 0!==g&&l.hasChanged){const a=l.Models.Registry.lookup(f.cid);a&&a.trigger("custom:restorehtml",g)}m.is_new?(f.unset("is_new",{silent:!0}),!0!==l.saving?(f.trigger("dom:module:unsaved"),void 0!==a&&0<a.length&& (a=l.Models.Registry.lookup(a.data("cid")))&&a.destroy()):void 0!==a&&0<a.length&&a[0].classList.remove("tb_new_row")):(f.unset("styleClicked",{silent:!0}),f.unset("visibileClicked",{silent:!0}));if(void 0!==tinyMCE)for(a=tinymce.editors.length-1;-1<a;--a)"content"!==tinymce.editors[a].id&&tinyMCE.execCommand("mceRemoveEditor",!0,tinymce.editors[a].id);"visual"===l.mode&&l.liveStylingInstance.clear();l.activeModel=f=null}x.body.off("themify_builder_change_mode.updatestyles");g=c=m.values=m.type=m.component= m.is_new=null;m.tabs.click=0}).on("themify_builder_change_mode.updatestyles",this.updateStyles.bind(this));setTimeout(function(){"setting"===m.clicked&&m.setUpEditors();m.callbacks();x.triggerEvent(h,"tb_editing_"+m.type);"module"===m.component&&x.triggerEvent(h,"tb_editing_module")},5);!0===d?f.unset("styleClicked",{silent:!0}):!0===e&&f.unset("visibileClicked",{silent:!0});return a},getStyleVal(a,b,c){if(null!==l.activeModel){void 0===c&&(c=this.values);void 0===b&&(b=l.activeBreakPoint);if("desktop"=== b||"styling"!==this.clicked)return null!==c&&""!==c[a]?c[a]:void 0;var d=this.breakpointsReverse;b=d.indexOf(b);for(let e=b,f=d.length;e<f;++e)if("desktop"!==d[e]){if(void 0!==c["breakpoint_"+d[e]]&&void 0!==c["breakpoint_"+d[e]][a]&&""!==c["breakpoint_"+d[e]][a])return c["breakpoint_"+d[e]][a]}else if(""!==c[a])return d=this.stylesData&&void 0!==this.stylesData[a]?this.stylesData[a].binding:void 0,void 0!==d&&void 0!==d[c[a]]&&void 0!==d[c[a]].responsive&&void 0!==d[c[a]].responsive.disabled&&-1!== d[c[a]].responsive.disabled.indexOf(a)?void 0:c[a]}},updateStyles(a,b,c){this.setStylingValues(b);a=this.clicked;this.clicked="styling";for(var d in this.stylesData){var e=this.stylesData[d].type;if(e&&"video"!==e&&"gallery"!==e&&"autocomplete"!==e&&"custom_css"!==e&&"builder"!==e&&!1!==this.stylesData[d].is_responsive&&("icon_radio"===e?e="radio":"icon_checkbox"===e?e="checkbox":"textarea"===e||"icon"===e||"hidden"===e||"number"===e?e="text":"image"===e?e="file":"padding"===e||"border_radius"=== e?e="margin":"frame"===e&&(e="layout"),b=this.getStyleVal(d),this[e].update(d,b,this),void 0!==this.stylesData[d].binding)){var f=w.document.getElementById(d);e="layout"===e?f.getElementsByClassName("tfl-icon"):"radio"===e||"checkbox"===e?f.getElementsByTagName("input"):[f];f=this.stylesData[d];for(let a=0,c=e.length;a<c;++a)this.binding(e[a],f,b)}}d=w.document.querySelectorAll("#tb_options_styling option.responsive_disable");for(b=d.length-1;0<=b;b--)d[b].disabled="desktop"!==c;this.clicked=a},setStylingValues(a){const b= l.Forms.serialize("tb_options_styling",!0),c="desktop"===a;!1===c&&void 0===this.values["breakpoint_"+a]&&(this.values["breakpoint_"+a]={});for(let d in b)!0===c?this.values[d]=b[d]:this.values["breakpoint_"+a][d]=b[d]},saveComponent(a){if(null!==this.values){l.saving=!0;var b=l.Forms;const e="module"===this.component;if(e&&!b.isValidate(w.document.getElementById("tb_options_setting"))||void 0!==z.Lightbox.$lightbox[0].getElementsByClassName("tb_disable_save")[0])return l.saving=!1,l.beforeEvent= null,a&&(l.hasChanged=!0,z.Lightbox.$lightbox.find(".tb_close_lightbox")[0].click()),!1;x.body.triggerHandler("themify_builder_save_component",a);"visual"===l.mode&&w.jQuery("body").triggerHandler("themify_builder_save_component",a);delete this.values.cid;const f=p.extend(!0,{},this.beforeData?this.beforeData:this.values);let g=!1,k="styling",m=h.getElementsByClassName("tb_element_cid_"+l.activeModel.cid)[0];void 0===m&&(m=h.querySelector('[data-cid="'+l.activeModel.cid+'"]'));if(null!==m){m=p(m); if("column"!==this.component){if("subrow"!==this.component){e&&(k="mod_settings");var c=b.serialize("tb_options_setting",!0);for(let a in c)this.values[a]=c[a]}c=b.serialize("tb_options_animation",!0);for(let a in c)this.values[a]=c[a];b=b.serialize("tb_options_visibility",!0);for(var d in b)this.values[d]=b[d];"visual"===l.mode&&("hide_all"===b.visibility_all||"hide"===b.visibility_desktop||"hide"===b.visibility_tablet||"hide"===b.visibility_tablet_landscape||"hide"===b.visibility_mobile?m[0].classList.add("tb_visibility_hidden"): m[0].classList.remove("tb_visibility_hidden"))}this.setStylingValues(l.activeBreakPoint);d={};d[k]=p.extend(!0,{},l.Utils.clear(this.values));l.activeModel.set(d,{silent:!0});e&&(this.is_new&&(g=m.closest(".module_column"),g.closest(".module_row").removeClass("tb_row_empty"),g.closest(".active_subrow").removeClass("tb_row_empty"),g=z.clone(g)),l.Instances.Builder[l.builderIndex].removeLayoutButton());let a;"visual"===l.mode&&(a=p.extend(!0,{},l.liveStylingInstance.undoData),m[0].classList.remove("tb_visual_hover"), m.find(".tb_visual_hover").removeClass("tb_visual_hover"));l.ActionBar.hoverCid===l.activeModel.cid&&(l.ActionBar.hoverCid=null,l.ActionBar.clearSelected());l.undoManager.push(l.activeModel.cid,l.beforeEvent,m,"save",{bsettings:f,asettings:this.values,styles:a,column:g})}z.Lightbox.close(a);l.beforeEvent=null;l.saving=!1}return!0},resetStyling(a,b){a.preventDefault();a.stopPropagation();b=!0===b?void 0:p("#tb_options_styling",ThemifyBuilderCommon.Lightbox.$lightbox)[0];var c=l.activeModel.get("elType"); "module"===c&&(c=l.activeModel.get("mod_name"));if(!this.beforeData&&(this.beforeData=p.extend(!0,{},this.values),void 0!==b)){const a=this;x.body.one("themify_builder_lightbox_before_close",function(){a.beforeData=null})}if(!1===l.GS.isGSPage&&null===l.GS.activeGS){var d=null;if(null!==l.GS.el){var e=l.GS.el.getElementsByClassName("tb_selected_style");d=[];for(var f=e.length-1;-1<f;--f)d.push(e[f].getAttribute("data-style-id"))}else void 0!==this.values[l.GS.key]&&("visual"===l.mode&&(d=this.values[l.GS.key].split(" ")), delete this.values[l.GS.key]);if(null!==d){null!==l.GS.field&&(l.GS.field.value="");l.GS.isGSPage=!0;for(e=d.length-1;-1<e;--e)l.GS.delete(d[e]);l.GS.isGSPage=!1;d=null;l.GS.generateValues(null,{},!0)}}f=ThemifyStyles.getStyleOptions(c);d={};e={};if("visual"===l.mode){var g=l.liveStylingInstance.prefix,k=this.breakpointsReverse;for(let a=k.length-1;-1<a;--a){var m=ThemifyStyles.getSheet(k[a],null!==l.GS.activeGS);m=m.cssRules?m.cssRules:m.rules;if(0<m.length){void 0===d[k[a]]&&(d[k[a]]={},e[k[a]]= {});for(let b=m.length-1;-1<b;--b)if(-1!==m[b].selectorText.indexOf(g)){let c=m[b].cssText.split("{")[1].split(";");void 0===d[k[a]][b]&&(d[k[a]][b]={},e[k[a]][b]={});for(let f=c.length-2;-1<f;--f){let g=c[f].trim().split(": ")[0].trim();if(void 0!==m[b].style[g]){let c=m[b].style[g];d[k[a]][b][g]=c;e[k[a]][b][g]={a:"",b:c};m[b].style[g]=""}}}}}"module"!==c&&(l.liveStylingInstance.removeBgSlider(),l.liveStylingInstance.removeBgVideo(),l.liveStylingInstance.getComponentBgOverlay().remove(),l.liveStylingInstance.bindBackgroundMode("repeat", "background_repeat"),l.liveStylingInstance.bindBackgroundMode("repeat","b_r_h"),l.liveStylingInstance.$liveStyledElmt[0].removeAttribute("data-tb_slider_videos"),l.liveStylingInstance.$liveStyledElmt.children(".tb_slider_videos,.tb_row_frame").remove())}for(var h in this.values)c=-1!==h.indexOf("_color")?"color":-1!==h.indexOf("_style")?"style":!1,g=null,0===h.indexOf("breakpoint_")||h===l.GS.key||void 0!==f[h]||-1!==h.indexOf("_apply_all")?g=!0:-1!==h.indexOf("_unit")?(c=h.replace(/_unit$/ig,"", ""),void 0!==f[c]&&(g=!0)):-1!==h.indexOf("_w")?(c=h.replace(/_w$/ig,"",""),void 0!==f[c]&&"font_select"===f[c].type&&(g=!0)):!1!==c&&(c=h.replace("_"+c,"_width"),void 0!==f[c]&&"border"===f[c].type&&(g=!0)),!0===g&&delete this.values[h];if(void 0!==b){l.hasChanged=!0;h=b.getElementsByClassName("tb_lb_option");for(c=h.length-1;-1<c;--c)if(f=h[c].value,g=h[c].classList,"px"!==f&&"solid"!==f&&"default"!==f&&"linear"!==f&&"n"!==f&&!g.contains("exclude-from-reset-field"))if(k=h[c].getAttribute("id"), void 0!==this.values[k]&&delete this.values[k],g.contains("tb_radio_input_container"))g.contains("tb_icon_radio")?(f=b.querySelector('[name="'+k+'"]:checked'),null!==f&&f.parentNode.click()):(f=b.querySelector('[name="'+k+'"]'),!0!==f.checked&&(f.checked=!0,x.triggerEvent(f,"change")));else if(g.contains("tb_uploader_input"))f&&h[c].parentNode.getElementsByClassName("tb_clear_input")[0].click();else if(g.contains("minicolors-input"))g=h[c].closest(".minicolors"),k=g.getElementsByClassName("tb_clear_btn")[0], f&&(h[c].value="",h[c].removeAttribute("data-opacity"),f=g.getElementsByClassName("minicolors-swatch-color")[0],f.style.opacity=f.style.backgroundColor="",g.nextElementSibling.value=""),void 0!==k&&(k.style.display="none");else if(f&&"SELECT"===h[c].tagName){if(g.contains("font-family-select"))h[c].value="";else if(g.contains("font-weight-select")){for(h[c].value="";h[c].firstChild;)h[c].removeChild(h[c].firstChild);this.font_select.updateFontVariant("",h[c],this)}else if(g.contains("tb_unit"))h[c].value= g.contains("tb_frame_unit")?"%":"px";else{if("repeat"===f&&"background_repeat"===k||"scroll"===f&&"background_attachment"===k||"left top"===f&&"background_position"===k)continue;h[c].selectedIndex=0}g.contains("themify-gradient-type")||x.triggerEvent(h[c],"change")}else if(g.contains("themify-layout-icon"))f=h[c].getElementsByClassName("tfl-icon")[0],f.classList.contains("selected")||f.click();else if(g.contains("tb_row_js_wrapper")){f=h[c].getElementsByClassName("tb_repeatable_field");for(g=f.length- 1;-1<g;--g)f[g].parentNode.removeChild(f[g]);h[c].getElementsByClassName("add_new")[0].click()}else g.contains("tb_angle_input")&&g.contains("tb_transform_field")?h[c].value="":g.contains("tb_angle_input")?h[c].value="180":g.contains("themify-gradient")?h[c].nextElementSibling.click():(h[c].value="",x.triggerEvent(h[c],g.contains("tb_range")?"keyup":"change"));"visual"!==l.mode||a.isTrigger||(l.liveStylingInstance.tempData=d,l.liveStylingInstance.undoData=e)}return e},create(a){const b=h.createDocumentFragment(); if(void 0===a||0===a.length){a=h.createElement("div");var c=h.createElement("p");c.textContent=themifyBuilder.i18n.no_op_module;a.appendChild(c);b.appendChild(a);return b}if("tabs"===a.type)b.appendChild(this.tabs.render(a,this));else for(c in a){if(!0===a[c].hide||void 0===a[c].type||"visibility"===this.clicked&&"row"===this.component&&"sticky_visibility"===a[c].id)continue;var d=a[c].type;let f=this[d].render(a[c],this);if("separator"!==d&&"expand"!==d&&"group"!==d){var e=a[c].id?a[c].id:a[c].topId; "tabs"!==d&&"multi"!==d&&"margin_opposity"!==d&&e&&("styling"===this.clicked?("visual"===l.mode&&void 0!==a[c].prop&&(this.styles[e]=p.extend(!0,{},a[c])),this.stylesData[e]=p.extend(!0,{},a[c])):"visual"===l.mode&&"setting"===this.clicked&&null!==this.values&&void 0!==this.values[e]&&!0!==this.is_repeat&&(this.settings[e]=this.values[a[c].id],void 0!==a[c].units&&void 0!==this.values[e+"_unit"]&&(this.settings[e+"_unit"]=this.values[e+"_unit"])));if("builder"!==d){let g=h.createElement("div");g.className= "tb_field";void 0===a[c].dc||a[c].dc||(g.className+=" tb_disable_dc");g.setAttribute("data-type",d);void 0!==e&&(g.className+=" "+e);void 0!==a[c].wrap_class&&(g.className+=" "+a[c].wrap_class);"custom_css"===d?g.appendChild(this.separator.render(a[c],this)):"toggle_switch"===d?g.className+=" switch-wrapper":"slider"===d?g.className+=" tb_slider_options":"message"===d&&void 0!==a[c].hideIf&&new Function("return "+a[c].hideIf)?g.className+=" tb_hide_option":void 0!==a[c].required&&"setting"===this.clicked&& (e=void 0!==a[c].required.message?a[c].required.message:themifyBuilder.i18n.not_empty,g.setAttribute("data-validation",void 0!==a[c].required.rule?a[c].required.rule:"not_empty"),g.setAttribute("data-error-msg",e),g.className+=" tb_must_validate");"styling"===this.clicked&&!1===a[c].is_responsive&&(g.className+=" responsive_disable");e=this.getTitle(a[c]);if(!1!==e){e=e.trim();let b=h.createElement("div"),m=h.createElement("span");b.className="tb_label";m.className="tb_label_text";m.textContent=e; b.appendChild(m);""===e&&(b.className+=" tb_empty_label");void 0!==a[c].help&&""!==a[c].label&&(b.classList.add("contains-help"),m.appendChild(this.help(a[c].help)));g.appendChild(b);"multi"!==d?(d=h.createElement("div"),d.className="tb_input",d.appendChild(f),g.appendChild(d)):g.appendChild(f)}else g.appendChild(f);b.appendChild(g)}else b.appendChild(f)}else b.appendChild(f)}return b},tabs:{click:0,render(a,b){const c=a.options,d=h.createDocumentFragment(),e=h.createElement("ul"),f="styling"===b.clicked&& 0===this.click&&"module"===b.component?h.createElement("div"):null,g=h.createElement("div"),k=void 0!==a.isRadio;let m=null,u=null;g.className="tb_tabs";e.className="tf_clearfix tb_tab_wrapper";++this.click;!0===k&&(void 0!==b.values[a.id]&&""!==b.values[a.id]&&(u=!0,m=b.values[a.id]),e.className+=" tb_radio_input_container",!0===b.is_repeat?(e.className+=!0===b.is_sort?" tb_lb_sort_child":" tb_lb_option_child",e.dataset.inputId=a.id):(e.className+=" tb_lb_option",e.id=a.id));for(let f in c){let g= h.createElement("li"),t=!0===k?h.createElement("label"):h.createElement("a"),r=h.createElement("div"),q=void 0!==c[f].href?c[f].href:"tb_"+this.click+"_"+f,v=c[f].options;r.id=q;r.className="tb_tab";""!==c[f].label&&(t.textContent=void 0!==c[f].label?c[f].label:b.label[f]);void 0!==c[f].icon&&t.appendChild(l.Utils.getIcon(c[f].icon));void 0!==c[f].title&&(t.title=c[f].title);void 0!==c[f].class&&""!==c[f].class&&(t.className=c[f].class);if(!0===k){let b=h.createElement("input");b.type="radio";b.className= "tb_radio_tab_input";b.name=a.id;if(m===f||m==="tb_"+f)b.checked=!0;b.value=f;t.setAttribute("href","#"+q);t.className="tb_radio_tab_label";t.appendChild(b)}else t.href="#"+q;null===u||m===f||m==="tb_"+f?(u=!0,g.className="current",r.appendChild(b.create(v)),v=null,r.style.display="block"):r.addEventListener("themify_builder_tabsactive",function(){this.appendChild(b.create(v));"setting"===b.clicked&&b.setUpEditors();b.callbacks();v=null},{once:!0,passive:!0});t.addEventListener("click",b.switchTabs); g.appendChild(t);e.appendChild(g);d.appendChild(r)}null!==f?(f.className="tb_styling_tab_nav",f.appendChild(e),g.appendChild(f)):g.appendChild(e);g.appendChild(d);setTimeout(b.callbacks.bind(b),5);return g}},group:{render(a,b){const c=h.createElement("div");void 0!==a.wrap_class&&(c.className=a.wrap_class);c.appendChild(b.create(a.options));return c}},builder:{render(a,b){b.is_repeat=!0;const c=h.createDocumentFragment(),d=h.createElement("div"),e=h.createElement("a"),f=this;d.className="tb_row_js_wrapper tf_rel tb_lb_option"; void 0!==a.wrap_class&&(d.className+=" "+a.wrap_class);d.id=a.id;e.className="add_new tf_plus_icon tb_icon_btn";e.href="#";e.textContent=void 0!==a.new_row?a.new_row:b.label.new_row;if(void 0!==b.values[a.id]){const c=b.values[a.id].slice(),e=p.extend(!0,{},b.values);for(let e=0,f=c.length;e<f;++e)b.values=c[e]||{},d.appendChild(this.builderFields(a,b));b.values=e}else d.appendChild(this.builderFields(a,b));d.appendChild(e);c.appendChild(d);setTimeout(function(){f.sortable(d,b);e.addEventListener("click", function(c){c.preventDefault();c.stopPropagation();b.is_repeat=!0;const d=f.builderFields(a,b);c=this.previousElementSibling.parentNode;c.insertBefore(d,e);setTimeout(function(){"setting"===b.clicked&&b.setUpEditors();b.callbacks();x.triggerEvent(h,"tb_repeatable_add_new",[d])},5);b.control.preview(c,null,{repeat:!0});b.is_repeat=null})},2E3);b.is_repeat=null;return c},builderFields(a,b){const c=h.createElement("div"),d=h.createElement("div"),e=h.createElement("div"),f=h.createElement("div"),g=h.createElement("ul"), k=h.createElement("li"),m=h.createElement("li"),u=h.createElement("div"),q=h.createElement("div"),n=this;c.className="tb_repeatable_field tf_clearfix";d.className="tb_repeatable_field_top";e.className="row_menu";f.tabIndex="-1";f.className="menu_icon";g.className="tb_down";k.className="tb_duplicate_row";m.className="tb_delete_row tf_close";k.textContent=b.label.duplicate;m.textContent=b.label.delete;u.className="toggle_row";q.className="tb_repeatable_field_content";q.appendChild(b.create(a.options)); g.appendChild(k);g.appendChild(m);e.appendChild(f);e.appendChild(g);d.appendChild(e);d.appendChild(u);c.appendChild(d);c.appendChild(q);d.addEventListener("click",function(c){c.stopPropagation();c.preventDefault();const d=c.target.classList,e=this.parentNode;if(d.contains("tb_delete_row")){if(confirm(themifyBuilder.i18n.rowDeleteConfirm)){const a=c.target.closest(".tb_row_js_wrapper");n.delete(c.target);b.control.preview(a,null,{repeat:!0});x.triggerEvent(a,"delete")}}else if(d.contains("tb_duplicate_row")){b.is_repeat= !0;c=p.extend(!0,{},b.values);b.values=l.Forms.serialize(e,!0,!0);const d=n.builderFields(a,b);e.parentNode.insertBefore(d,e.nextElementSibling);b.values=c;setTimeout(function(){"setting"===b.clicked&&b.setUpEditors();b.callbacks();x.triggerEvent(e.parentNode,"duplicate");x.triggerEvent(h,"tb_repeatable_duplicate",[d])},5);b.control.preview(e,null,{repeat:!0});b.is_repeat=null}else d.contains("toggle_row")&&n.toggle(c.target);d.contains("menu_icon")||l.Utils.hideOnClick(g)});return c},sortable(a, b){const c=l.Utils.getMouseEvents();a.addEventListener(c.mousedown,function(a){if(("touchstart"===a.type||1===a.which)&&a.target.classList.contains("tb_repeatable_field_top")){a.stopImmediatePropagation();let d,f,g,k,m,h=0,q,n,t,r={},y=this.ownerDocument,v=a.target.closest(".tb_repeatable_field"),A,D,p,C=!1,B;const w=function(a){a.stopImmediatePropagation();d&&cancelAnimationFrame(d);d=requestAnimationFrame(function(){if(y){var b=a.touches?a.touches[0].clientX:a.clientX,c=a.touches?a.touches[0].clientY: a.clientY;b="mousemove"===a.type?a.target:y.elementFromPoint(b,c);var d=c-n-B.getBoundingClientRect().top;if(0<d&&d<p){if(q.style.transform="translateY("+d+"px)",E(c),!(c>=D||c<=A)){if(b&&b!==v&&b.classList.contains("tb_repeatable_field")){d=c>h?"bottom":"top";if(k!==d||g!==b)v.style.display="none","bottom"===d?b.after(v):b.before(v),v.style.display="";g=b;k=d}h=c}}else E(c)}})},E=function(a){if(t)if(a>=D||a<=A){if(!1===C){C=!0;const b=parseInt(D/10);t.scrollTop+=a<=A?-1*b:b;f&&clearTimeout(f);f= setTimeout(function(){requestAnimationFrame(function(){C&&(C=!1,E(a))})},2*b)}}else f&&clearTimeout(f),C=!1},F=function(a){y.body.classList.add("tb_start_animate","tb_move_drag");l.Utils.hideOnClick(v.getElementsByClassName("tb_down")[0]);B=v.parentNode;B.classList.add("tb_sort_start");if(void 0!==tinyMCE){var b=B.getElementsByClassName("tb_lb_wp_editor");for(let a=b.length-1;-1<a;--a){let c=b[a].id;r[c]=tinymce.get(c).getContent();tinyMCE.execCommand("mceRemoveEditor",!1,c)}}v.classList.contains("collapsed")|| (v.getElementsByClassName("tb_repeatable_field_content")[0].style.display="none",v.classList.add("collapsed"),m=!0);q=v.cloneNode(!0);q.getElementsByClassName("tb_repeatable_field_content")[0].remove();t=v.closest(".tf_scrollbar");q.className+=" tb_sort_handler";v.classList.add("tb_current_sort");v.after(q);n=q.getBoundingClientRect().height/2;p=B.offsetHeight;b=t.getBoundingClientRect();A=b.top;D=b.bottom-40;w(a)};y.addEventListener(c.mouseup,function(a){this.removeEventListener(c.mousemove,F,{passive:!0, once:!0});this.removeEventListener(c.mousemove,w,{passive:!0});if(B){a.stopImmediatePropagation();d&&cancelAnimationFrame(d);f&&clearTimeout(f);q&&q.remove();if(void 0!==tinyMCE)for(let a in r)tinyMCE.execCommand("mceAddEditor",!1,a),tinymce.get(a).setContent(r[a]);v.classList.remove("tb_current_sort");m&&(v.classList.remove("collapsed"),v.getElementsByClassName("tb_repeatable_field_content")[0].style.display="");requestAnimationFrame(function(){b.control.preview(B,null,{repeat:!0});x.triggerEvent(B, "sortable");B.classList.remove("tb_sort_start");B=null})}this.body.classList.remove("tb_start_animate","tb_move_drag");g=q=m=k=h=r=t=y=p=n=C=A=D=v=d=f=null},{passive:!0,once:!0});y.addEventListener(c.mousemove,F,{passive:!0,once:!0});y.addEventListener(c.mousemove,w,{passive:!0})}},{passive:!0})},toggle(a){p(a).closest(".tb_repeatable_field").toggleClass("collapsed").find(".tb_repeatable_field_content").slideToggle()},delete(a){a=a.closest(".tb_repeatable_field");x.triggerEvent(h,"tb_repeatable_delete", [a]);a.remove()}},accordion:{expand(a,b,c){a.addEventListener("click",function(a){let d=this.getElementsByClassName("tb_accordion_fields_options")[0];if(void 0===d){d=h.createElement("div");d.style.display="none";d.className="tb_toggleable_fields_options tb_accordion_fields_options";c.is_repeat=!0;let a=null;const e=this.parentNode.closest(".tb_accordion_fields").id,k=this.getAttribute("data-id");void 0!==c.values[e]&&void 0!==c.values[e][k]&&void 0!==c.values[e][k].val&&(a=p.extend(!0,{},c.values), c.values=c.values[e][k].val);d.appendChild(c.create(b.options));this.appendChild(d);"setting"===c.clicked&&c.setUpEditors();c.callbacks();null!==a&&(c.values=a);c.is_repeat=a=null}else if(d.contains(a.target))return;a.stopPropagation();a.preventDefault();this.classList.contains("tb_closed")?p(d).slideDown(function(){this.parentNode.classList.remove("tb_closed")}):p(d).slideUp(function(){this.parentNode.classList.add("tb_closed")})})},resetMotion(a,b){if(void 0!==b.values.motion_effects)for(var c in b.values.motion_effects)b.values.motion_effects[c].val= {},b.values.motion_effects[c].val[c+"_dir"]="";a=a.parentNode.querySelector("#motion_effects");c=a.getElementsByTagName("select");b=a.getElementsByClassName("tb_position_box_wrapper");a=a.getElementsByClassName("tb_slider_wrapper");for(var d=c.length-1;-1<d;--d)c[d].selectedIndex=0;for(c=b.length-1;-1<c;--c)b[c].querySelector("input").value="50,50",b[c].querySelector(".tb_position_box_handle").setAttribute("style","left:50%;top:50%;");for(b=a.length-1;-1<b;--b){c=a[b].getElementsByClassName("tb_slider_label_u")[0]; d=a[b].getElementsByClassName("ui-slider-handle");let e=a[b].getElementsByTagName("input")[0],f=a[b].getElementsByClassName("tb_slider_label_l")[0];c?(e.value="0,100",d[0].setAttribute("style","left:0%;"),d[1].setAttribute("style","left:100%;"),a[b].getElementsByClassName("ui-slider-range")[0].setAttribute("style","left:0%;width:100%;"),f.textContent="0%",c.textContent="100%"):(e.value="5",d[0].setAttribute("style","left:50%;"),f.textContent="5")}},render(a,b){const c=this,d=h.createElement("ul"), e=h.createDocumentFragment(),f=h.createElement("a");d.id=a.id;d.className="tb_toggleable_fields tb_accordion_fields tb_lb_option";"motion_effects"===a.id&&b.values&&b.values.hasOwnProperty("custom_parallax_scroll_speed")&&(b.values.hasOwnProperty("motion_effects")||(b.values.motion_effects={v:{val:{v_speed:b.values.custom_parallax_scroll_speed,v_dir:""}},h:{val:{}},t:{val:{t_speed:""}},r:{val:{}},s:{val:{}}},delete b.values.custom_parallax_scroll_speed),b.values.hasOwnProperty("custom_parallax_scroll_reverse")? (b.values.motion_effects.v.val.v_dir="down",delete b.values.custom_parallax_scroll_reverse):b.values.motion_effects.v.val.v_dir="up",b.values.hasOwnProperty("custom_parallax_scroll_fade")&&(b.values.motion_effects.t.val.t_speed=b.values.custom_parallax_scroll_speed,delete b.values.custom_parallax_scroll_fade));const g=b.values[a.id],k=function(e,f){const g=h.createElement("li"),k=h.createElement("input"),m=h.createElement("div");m.textContent=a.options[e].label;m.className="tb_toggleable_fields_title tb_accordion_fields_title tf_plus_icon"; k.type="hidden";k.value="";g.className="tb_closed";g.setAttribute("data-id",e);void 0!==f.val&&(k.value=JSON.stringify(f.val));g.appendChild(k);g.appendChild(m);c.expand(g,a.options[e],b);d.appendChild(g)};if(void 0!==g)for(let b in g)void 0!==a.options[b]&&k(b,g[b]);for(let b in a.options)void 0!==g&&void 0!==g[b]||k(b,a.options[b]);e.appendChild(d);"motion_effects"===a.id&&(f.href="#",f.className="tb_motion_reset_link",f.textContent=b.label.reset_effect,f.addEventListener("click",function(a){a.preventDefault(); a.stopPropagation();c.resetMotion(this,b)}),e.appendChild(f));return e}},toggleable_fields:{sort(a,b){const c=l.Utils.getMouseEvents();a.addEventListener(c.mousedown,function(a){if(!("touchstart"!==a.type&&1!==a.which||a.target.parentNode!==this&&a.target.parentNode.parentNode!==this)){a.stopImmediatePropagation();let d,f,g,k,m,h=0,l,n,t,r={},y=this.ownerDocument,v=a.target.closest(".tb_toggleable_item"),A,p,w,C=!1,B;const z=function(a){a.stopImmediatePropagation();d&&cancelAnimationFrame(d);d=requestAnimationFrame(function(){if(y){var b= a.touches?a.touches[0].clientX:a.clientX,c=a.touches?a.touches[0].clientY:a.clientY;b="mousemove"===a.type?a.target:y.elementFromPoint(b,c);var d=c-n-B.getBoundingClientRect().top;if(0<d&&d<w){if(l.style.transform="translateY("+d+"px)",E(c),!(c>=p||c<=A)){if(b&&b!==v&&b.classList.contains("tb_toggleable_item")){d=c>h?"bottom":"top";if(k!==d||g!==b)v.style.display="none","bottom"===d?b.after(v):b.before(v),v.style.display="";g=b;k=d}h=c}}else E(c)}})},E=function(a){if(t)if(a>=p||a<=A){if(!1===C){C= !0;const b=parseInt(p/10);t.scrollTop+=a<=A?-1*b:b;f&&clearTimeout(f);f=setTimeout(function(){requestAnimationFrame(function(){C&&(C=!1,E(a))})},2*b)}}else f&&clearTimeout(f),C=!1},F=function(a){y.body.classList.add("tb_start_animate","tb_move_drag");B=v.parentNode;B.classList.add("tb_sort_start");if(void 0!==tinyMCE){var b=B.getElementsByClassName("tb_lb_wp_editor");for(let a=b.length-1;-1<a;--a){let c=b[a].id;r[c]=tinymce.get(c).getContent();tinyMCE.execCommand("mceRemoveEditor",!1,c)}}v.classList.contains("tb_closed")|| ((b=v.getElementsByClassName("tb_toggleable_fields_options")[0])&&(b.style.display="none"),v.classList.add("tb_closed"),m=!0);l=v.cloneNode(!0);(b=l.getElementsByClassName("tb_toggleable_fields_options")[0])&&b.remove();t=v.closest(".tf_scrollbar");l.className+=" tb_sort_handler";v.classList.add("tb_current_sort");v.after(l);n=l.getBoundingClientRect().height/2;w=B.offsetHeight;b=t.getBoundingClientRect();A=b.top;p=b.bottom-40;z(a)};y.addEventListener(c.mouseup,function(a){this.removeEventListener(c.mousemove, F,{passive:!0,once:!0});this.removeEventListener(c.mousemove,z,{passive:!0});if(B){a.stopImmediatePropagation();d&&cancelAnimationFrame(d);f&&clearTimeout(f);l&&l.remove();if(void 0!==tinyMCE)for(let a in r)tinyMCE.execCommand("mceAddEditor",!1,a),tinymce.get(a).setContent(r[a]);v.classList.remove("tb_current_sort");m&&((a=v.getElementsByClassName("tb_toggleable_fields_options")[0])&&(a.style.display=""),v.classList.remove("tb_closed"));requestAnimationFrame(function(){b.control.preview(B,null,{repeat:!0}); x.triggerEvent(B,"sortable");B.classList.remove("tb_sort_start");B=null})}this.body.classList.remove("tb_start_animate","tb_move_drag");g=l=m=k=h=r=t=y=w=C=n=A=p=v=d=f=null},{passive:!0,once:!0});y.addEventListener(c.mousemove,F,{passive:!0,once:!0});y.addEventListener(c.mousemove,z,{passive:!0})}},{passive:!0})},expand(a,b,c){a.addEventListener("click",function(a){if(this.classList.contains("tb_toggleable_field_disabled")||a.target.closest(".switch-wrapper"))a.target.closest(".tb_toggleable_fields_options")|| (a=this.getElementsByClassName("tb_toggleable_fields_options")[0],p(a).slideUp(function(){this.parentNode.classList.add("tb_closed")}));else{let d=this.getElementsByClassName("tb_toggleable_fields_options")[0];if(!d){d=h.createElement("div");d.style.display="none";d.className="tb_toggleable_fields_options tf_box tf_clear";this.appendChild(d);c.is_repeat=!0;let a=this.closest(".tb_toggleable_fields").id,e=null,k=this.getAttribute("data-id");void 0!==c.values[a]&&void 0!==c.values[a][k]&&void 0!==c.values[a][k].val&& (e=p.extend(!0,{},c.values),c.values=c.values[a][k].val);d.appendChild(c.create(b.options));"setting"===c.clicked&&c.setUpEditors();c.callbacks();null!==e&&(c.values=e);c.is_repeat=null}else if(d.contains(a.target))return;a.stopPropagation();a.preventDefault();this.classList.contains("tb_closed")?p(d).slideDown(function(){this.parentNode.classList.remove("tb_closed")}):p(d).slideUp(function(){this.parentNode.classList.add("tb_closed")})}})},disable(a,b){const c=a.closest("li"),d=c.classList;a.checked? d.remove("tb_toggleable_field_disabled"):d.add("tb_toggleable_field_disabled","tb_closed");b.control.preview(c.parentNode,null,{repeat:!0})},render(a,b){const c=this,d=h.createElement("ul");d.className="tb_toggleable_fields tf_rel";!0===b.is_repeat?(d.dataset.inputId=a.id,d.className+=" tb_lb_option_child"):(d.id=a.id,d.className+=" tb_lb_option");const e=b.is_repeat,f=b.values[a.id];b.is_repeat=!0;const g=function(e,f){const g={type:"toggle_switch",id:"",options:{on:{name:"1",value:b.label.s},off:{name:"0", value:b.label.hi}},"default":"1"===f.on?"on":"off",control:!1},k=h.createElement("li"),m=h.createElement("input"),t=h.createElement("div"),l=b.create([g]);t.innerHTML+=a.options[e].label;t.className="tb_toggleable_fields_title tf_plus_icon";m.type="hidden";m.value="";k.className="tb_toggleable_item tb_closed";"off"===g["default"]&&(k.className+=" tb_toggleable_field_disabled");k.setAttribute("data-id",e);void 0!==f.val&&(m.value=JSON.stringify(f.val));l.querySelector(".toggle_switch").addEventListener("change", function(a){a.stopPropagation();c.disable(this,b)},{passive:!0});k.appendChild(m);k.appendChild(t);k.appendChild(l);c.expand(k,a.options[e],b);d.appendChild(k)};if(void 0!==f)for(let b in f)void 0!==a.options[b]&&g(b,f[b]);for(let b in a.options)void 0===f[b]&&g(b,a.options[b]);c.sort(d,b);b.is_repeat=e;return d}},sortable_fields:{getDefaults(a,b){const c=[{id:"icon",type:"icon",label:b.label.icon},{id:"before",type:"text",label:b.label.b_t},{id:"after",type:"text",label:b.label.a_t}];b={date:[{id:"format", type:"select",label:b.label.d_f,"default":"def",options:{"F j, Y":b.label.F_j_Y,"Y-m-d":b.label.Y_m_d,"m/d/Y":b.label.m_d_Y,"d/m/Y":b.label.d_m_Y,def:b.label.def,custom:b.label.cus},binding:{not_empty:{hide:"custom"},custom:{show:"custom"}}},{id:"custom",type:"text",control:{event:"change"},label:b.label.cus_f,help:b.label.cus_fd_h}],time:[{id:"format",type:"select",label:b.label.t_f,"default":"def",options:{"g:i a":b.label.g_i_a,"g:i A":b.label.g_i_A,"H:i":b.label.H_i,def:b.label.def,custom:b.label.cus}, binding:{not_empty:{hide:"custom"},custom:{show:"custom"}}},{id:"custom",type:"text",control:{event:"change"},label:b.label.cus_f,help:b.label.cus_ft_h}],author:[{id:"l",type:"toggle_switch",label:b.label.l,options:"simple"},{id:"a_p",type:"toggle_switch",label:b.label.a_p,binding:{checked:{show:"p_s"},not_checked:{hide:"p_s"}},options:"simple"},{id:"p_s",type:"range",label:b.label.p_s,"class":"xsmall",units:{px:{max:96}},control:{event:"change"}}],comments:[{id:"l",type:"toggle_switch",label:b.label.l, options:"simple"},{id:"no",type:"text",control:{event:"change"},label:b.label.no_c},{id:"one",type:"text",control:{event:"change"},label:b.label.one_c},{id:"comments",type:"text",control:{event:"change"},label:b.label.comments}],terms:[{id:"post_type",type:"query_posts",tax_id:"taxonomy"},{id:"l",type:"toggle_switch",label:b.label.l,options:"simple"},{id:"sep",type:"text",control:{event:"change"},label:b.label.sep}]};if(void 0!==b[a])for(let d=0,e=c.length;d<e;++d)b[a].push(c[d]);return b[a]},create(a, b,c,d,e,f){const g=h.createElement("li");g.textContent=b.options[c].label;g.setAttribute("data-type",c);g.className="tb_sort_fields_item";if(!0===f){f=!1;if(d)void 0!==e&&(f=this.find(e,d));else{void 0!==e&&(f=this.find(e,c,!0));g.setAttribute("data-new",!0);b=z.Lightbox.$lightbox[0].getElementsByClassName(b.id)[0];let a=1;d=c+"_"+a;if(void 0!==b)for(;null!==b.querySelector('[data-id="'+d+'"]');)++a,d=c+"_"+a}g.setAttribute("data-id",d);c=h.createElement("span");d=h.createElement("input");!1!==f&& void 0!==e[f].val&&(d.value=JSON.stringify(e[f].val));d.type="hidden";c.className="tb_sort_fields_remove tf_close";c.title=a.label["delete"];g.appendChild(l.Utils.getIcon("ti-pencil"));g.appendChild(d);g.appendChild(c)}return g},sort(a,b){const c=l.Utils.getMouseEvents();a.addEventListener(c.mousedown,function(a){if(("touchstart"===a.type||1===a.which)&&a.target.parentNode===this){let d,f,g,k=0,m=0,h,l,n,t={},r=this.ownerDocument,y=a.target,v,A;const p=function(a){a.stopImmediatePropagation();d&& cancelAnimationFrame(d);d=requestAnimationFrame(function(){if(r){var b=a.touches?a.touches[0].clientX:a.clientX,c=a.touches?a.touches[0].clientY:a.clientY;b<v.left?b=v.left:b>v.right&&(b=v.right);c<v.top?c=v.top:c>v.bottom&&(c=v.bottom);var d="mousemove"===a.type?a.target:r.elementFromPoint(b,c);h.style.transform="translate("+(b-l-v.left)+"px,"+(c-n-v.top)+"px)";if(d&&d!==y&&d.classList.contains("tb_sort_fields_item")){const a=c>k||b>m?"bottom":"top";if(g!==a||f!==d)y.style.display="none","bottom"=== a?d.after(y):d.before(y),y.style.display="";f=d;g=a}k=c;m=b}})},w=function(a){r.body.classList.add("tb_start_animate","tb_move_drag");A=y.parentNode;A.classList.add("tb_sort_start");if(void 0!==tinyMCE){var b=A.getElementsByClassName("tb_lb_wp_editor");for(let a=b.length-1;-1<a;--a){let c=b[a].id;t[c]=tinymce.get(c).getContent();tinyMCE.execCommand("mceRemoveEditor",!1,c)}}h=y.cloneNode(!0);(b=h.getElementsByClassName("tb_sort_field_dropdown")[0])&&b.remove();h.className+=" tb_sort_handler";y.classList.add("tb_current_sort"); y.after(h);b=h.getBoundingClientRect();v=A.getBoundingClientRect();n=b.height/2-A.offsetTop;l=b.width/2-A.offsetLeft;p(a)};r.addEventListener(c.mouseup,function(a){this.removeEventListener(c.mousemove,w,{passive:!0,once:!0});this.removeEventListener(c.mousemove,p,{passive:!0});if(A){a.stopImmediatePropagation();d&&cancelAnimationFrame(d);h&&h.remove();if(void 0!==tinyMCE)for(let a in t)tinyMCE.execCommand("mceAddEditor",!1,a),tinymce.get(a).setContent(t[a]);y.classList.remove("tb_current_sort");requestAnimationFrame(function(){b.control.preview(A, null,{repeat:!0});x.triggerEvent(A,"sortable");A.classList.remove("tb_sort_start");A=null})}this.body.classList.remove("tb_start_animate","tb_move_drag");f=h=g=k=m=t=r=n=l=v=y=d=null},{passive:!0,once:!0});r.addEventListener(c.mousemove,w,{passive:!0,once:!0});r.addEventListener(c.mousemove,p,{passive:!0})}},{passive:!0})},find(a,b,c){for(let d=a.length-1;-1<d;--d)if(a[d].id===b||!0===c&&b===a[d].type)return d;return!1},edit(a,b,c,d){var e=d.dataset.type;let f=d.getElementsByClassName("tb_sort_field_dropdown")[0]; if(!f){f=h.createElement("div");f.className="tb_sort_field_dropdown tb_sort_field_dropdown_"+e;var g=h.createElement("span");const k=d.dataset.id;g.className="tb_sort_field_dropdown_pointer";f.appendChild(g);g=null;b=b.options[e].options;void 0===b&&(b=this.getDefaults(e,a));a.is_repeat=a.is_sort=!0;if(void 0!==c){const b=d.dataset["new"]?!0:!1;e=this.find(c,!0===b?e:k,b);!1!==e&&void 0!==c[e].val&&(g=p.extend(!0,{},a.values),a.values=c[e].val)}f.appendChild(a.create(b));d.appendChild(f);a.callbacks(); null!==g&&(a.values=g);a.is_sort=a.is_repeat=g=null}if(!d.classList.contains("current")){d.classList.add("current");const a=function(b){1===b.which&&(b.target===d||d.contains(b.target)||Themify_Icons.target&&d.contains(Themify_Icons.target[0])&&"block"===this.getElementById("themify_lightbox_fa").style.display?d.classList.add("current"):(d.classList.remove("current"),this.removeEventListener(b.type,a,{passive:!0})))};w.document.addEventListener("mousedown",a,{passive:!0})}},remove(a,b){b=b.closest("li"); const c=b.parentNode;b.parentNode.removeChild(b);a.control.preview(c,null,{repeat:!0});x.triggerEvent(c,"delete")},render(a,b){const c=this,d=h.createElement("div"),e=h.createElement("div"),f=h.createElement("div"),g=h.createElement("ul"),k=h.createElement("ul"),m=b.values[a.id]?b.values[a.id].slice(0):[];d.className="tb_sort_fields_wrap tf_box tf_rel tf_w";k.className="tb_sort_fields_parent";!0===b.is_repeat?(k.dataset.inputId=a.id,k.className+=!0===b.is_sort?" tb_lb_sort_child":" tb_lb_option_child"): (k.id=a.id,k.className+=" tb_lb_option");g.className="tb_ui_dropdown_items";e.className="tb_ui_dropdown_label tb_sort_fields_plus";e.tabIndex="-1";f.className="tb_sort_fields_plus_wrap";for(let c in a.options)g.appendChild(this.create(b,a,c));for(let c=0,d=m.length;c<d;++c)!0===b.is_new&&!0!==m[c].show||k.appendChild(this.create(b,a,m[c].type,m[c].id,m,!0));g.addEventListener("click",function(d){"LI"===d.target.tagName&&(d.preventDefault(),d.stopPropagation(),l.Utils.hideOnClick(this),k.appendChild(c.create(b, a,d.target.dataset.type,null,m,!0)),b.control.preview(k,null,{repeat:!0}))});k.addEventListener("click",function(d){d.target.classList.contains("tb_sort_fields_remove")?(d.preventDefault(),d.stopPropagation(),c.remove(b,d.target)):"LI"===d.target.tagName&&(d.preventDefault(),d.stopPropagation(),c.edit(b,a,m,d.target))});f.appendChild(e);f.appendChild(g);d.appendChild(k);d.appendChild(f);setTimeout(function(){c.sort(k,b)},800);!0===b.is_new&&b.afterRun.push(function(){b.control.preview(k,null,{repeat:!0})}); return d}},multi:{render(a,b){const c=h.createElement("div");c.className="tb_multi_fields tb_fields_count_"+a.options.length;c.appendChild(b.create(a.options));return c}},color:{is_typing:null,controlChange(a,b,c){const d=this,e=p(a),f=c.id,g=h.createElement("div");g.className="tb_clear_btn tf_close";g.addEventListener("click",function(){this.style.display="none";a.value="";e.trigger("keyup")},{passive:!0});e.minicolors({opacity:void 0===c.opacity?!0:!!c.opacity,swatches:themifyColorManager.toColorsArray(), changeDelay:10,beforeShow(){const a=z.Lightbox.$lightbox,b=e.closest(".minicolors"),c=b.find(".minicolors-panel");c.css("visibility","hidden").show();a.offset().left+a.width()<=c.offset().left+c.width()?b[0].classList.add("tb_minicolors_right"):b[0].classList.remove("tb_minicolors_right");c.css("visibility","").hide();l.hasChanged=!0},show(){themifyColorManager.initColorPicker()},hide(){g.style.display=""!==a.value?"block":"none"},change(a,c){a?c&&("0.99"==c?c=1:0>=parseFloat(c)&&(c=0)):c="";d.is_typing|| c===h.activeElement||(b.value=c);a&&0>=parseFloat(p(this).minicolors("opacity"))&&p(this).minicolors("opacity",0);"visual"===l.mode&&x.triggerEvent(this,"themify_builder_color_picker_change",{id:f,val:a?p(this).minicolors("rgbaString"):""})}}).minicolors("show");c=function(b){let c=parseFloat(this.value.trim().replace(",","."));if(1<c||isNaN(c)||""===c||0>c)c=a.value?1:"";"blur"===b.type&&(this.value=c);d.is_typing="keyup"===b.type;e.minicolors("opacity",c)};b.addEventListener("blur",c,{passive:!0}); b.addEventListener("keyup",c,{passive:!0});a.parentNode.appendChild(g);a.setAttribute("data-minicolors-initialized",!0)},setColor(a,b,c,d){let e=d,f="";""!==d&&(-1!==d.indexOf("_")?(l.Utils.toRGBA(d),d=d.split("_"),(f=d[1])?0>=parseFloat(f)&&(f=0):f=1,e=d[0]):(e=d,f=1),-1===e.indexOf("#")&&(e="#"+e));a.value=e;a.setAttribute("data-opacity",f);b.style.background=e;b.style.opacity=f;c.value=f},update(a,b,c){a=w.document.getElementById(a);null!==a&&(c=a.parentNode,void 0===b&&(b=""),this.setColor(a, c.getElementsByClassName("minicolors-swatch-color")[0],c.nextElementSibling,b))},render(a,b){const c=h.createDocumentFragment(),d=h.createElement("div"),e=h.createElement("div"),f=h.createElement("input"),g=h.createElement("input"),k=h.createElement("span"),m=h.createElement("span"),u=b.getStyleVal(a.id),l=this;d.className="minicolors_wrapper";e.className="minicolors minicolors-theme-default";f.type="text";f.className="minicolors-input";f.autocomplete="off";void 0!==a["class"]&&(f.className+=" "+ a.class);!0===b.is_repeat?(f.className+=!0===b.is_sort?" tb_lb_sort_child":" tb_lb_option_child",f.dataset.inputId=a.id):(f.id=a.id,f.className+=" tb_lb_option");k.className="minicolors-swatch";m.className="minicolors-swatch-color tf_abs";g.type="text";g.className="color_opacity";k.appendChild(m);e.appendChild(f);e.appendChild(k);d.appendChild(e);d.appendChild(g);b.initControl(f,a);k.addEventListener("click",function(){d.insertAdjacentElement("afterbegin",f);e.parentNode.removeChild(e);l.controlChange(f, g,a)},{once:!0,passive:!0});f.addEventListener("focusin",function(){k.click()},{once:!0,passive:!0});g.addEventListener("focusin",function(a){f.dataset.minicolorsInitialized?p(f).minicolors("show"):(f.dataset.opacity=this.value,k.click())},{passive:!0});void 0!==u&&this.setColor(f,m,g,u);c.appendChild(d);void 0!==a.after&&c.appendChild(b.after(a));void 0!==a.description&&c.appendChild(b.description(a.description));void 0!==a.tooltip&&c.appendChild(b.tooltip(a.tooltip));return c}},text:{update(a,b, c){a=w.document.getElementById(a);null!==a&&(a.value=void 0!==b?b:"")},render(a,b){const c=h.createDocumentFragment(),d=h.createElement("input"),e=b.getStyleVal(a.id);d.type=void 0!==a.input_type?a.input_type:"text";!0===b.is_repeat?(d.className=!0===b.is_sort?"tb_lb_sort_child":"tb_lb_option_child",d.dataset.inputId=a.id):(d.className="tb_lb_option",d.id=a.id);void 0!==a.placeholder&&(d.placeholder=a.placeholder);if(void 0!==a.custom_args)for(let b in a.custom_args)d.setAttribute(b,a.custom_args[b]); void 0!==e&&(d.value=e);void 0!==a["class"]&&(d.className+=" "+a.class);c.appendChild(b.initControl(d,a));void 0!==a.unit&&c.appendChild(b.select.render(a.unit,b));void 0!==a.after&&c.appendChild(b.after(a));void 0!==a.description&&c.appendChild(b.description(a.description));void 0!==a.tooltip&&c.appendChild(b.tooltip(a.tooltip));return c}},number:{render(a,b){a.input_type="number";void 0===a.custom_args&&(a.custom_args={min:0});void 0!==a.step&&(void 0===a.custom_args&&(a.custom_args={}),a.custom_args.step= a.step);return b.text.render(a,b)}},angle:{render(a,b){a.input_type="number";a.custom_args={min:0,max:360};const c=h.createElement("div");c.tabIndex=-1;c.className="tb_angle_container tf_rel";a.class=void 0!==a["class"]?a["class"]+" xsmall tb_lb_option tb_angle_input":"xsmall tb_lb_option tb_angle_input";c.appendChild(b.text.render(a,b));const d=c.querySelector("#"+a.id);b.afterRun.push(function(){const a=l.Utils.getMouseEvents();d.addEventListener(a.mousedown,function(b){b.stopImmediatePropagation(); let c=this.parentNode.querySelector(".tb_angle_circle");if(!c){let a=this.value;const b=h.createElement("div"),d=h.createElement("div");c=h.createElement("div");""!==a&&(b.style.transform="rotate("+a+"deg)");b.className="tb_angle_dot";c.className="tb_angle_circle";d.className="tb_angle_circle_wrapper";c.appendChild(b);d.appendChild(c);this.parentNode.appendChild(d)}c.addEventListener(b.type,function(b){if("touchstart"===b.type||1===b.which){var c=this.getBoundingClientRect();let e=this.offsetWidth/ 2+c.left,f=this.offsetHeight/2+c.top,g;this.parentNode.querySelector(".tb_angle_circle_wrapper");let k=this.parentNode.querySelector(".tb_angle_dot");const h=180/Math.PI;c=this.ownerDocument;const m=function(a){a.stopImmediatePropagation();this.body.classList.add("tb_start_animate","tb_show_overlay");this.body.style.cursor="grab"},l=function(a){a.stopImmediatePropagation();g&&cancelAnimationFrame(g);g=requestAnimationFrame(function(){let b=Math.atan2(f-(a.touches?a.touches[0].clientY:a.clientY),e- (a.touches?a.touches[0].clientX:a.clientX))*h;b-=90;0>b&&(b+=360);b=Math.round(b);k.style.transform="rotate("+b+"deg)";d.value=b;x.triggerEvent(d,"change")})};c.addEventListener(a.mousemove,m,{passive:!0,once:!0});c.addEventListener(a.mousemove,l,{passive:!0});c.addEventListener(a.mouseup,function(b){g&&cancelAnimationFrame(g);this.removeEventListener(a.mousemove,m,{passive:!0,once:!0});this.removeEventListener(a.mousemove,l,{passive:!0});this.body.classList.remove("tb_start_animate","tb_show_overlay"); this.body.style.cursor="";requestAnimationFrame(function(){k=e=g=f=null})},{passive:!0,once:!0});l(b)}},{passive:!0})},{passive:!0,once:!0})});return c}},autocomplete:{cache:{},xhr:null,render(a,b){b=b.text.render(a,b);if(void 0===a.dataset)return b;const c=b.querySelector("input"),d=this,e=h.createElement("div");c.autocomplete="off";e.className="tb_autocomplete_container";b.appendChild(e);c.addEventListener("input",function(){const b=this.nextElementSibling;for(b.style.display="none";null!==b.firstChild;)b.removeChild(b.firstChild); b.style.display="";const c=this.value,e=a.dataset,m=function(a){const c=h.createDocumentFragment();for(let b in a){let d=h.createElement("div");d.className="tb_autocomplete_item";d.setAttribute("data-value",b);d.innerText=a[b];c.appendChild(d)}b.classList.add("tf_scrollbar");b.appendChild(c)};void 0===d.cache[e]&&(d.cache[e]={});if(void 0!==d.cache[e][c])m(d.cache[e][c]);else if(""!==c){null!==d.xhr&&d.xhr.abort();const a=this.parentNode;a.classList.add("tb_autocomplete_loading","tf_loader");d.xhr= p.ajax({type:"POST",url:themifyBuilder.ajaxurl,dataType:"json",data:{action:"tb_get_autocomplete",dataset:e,value:c,nonce:themifyBuilder.tb_load_nonce,pid:themifyBuilder.post_ID},success(a){a.success&&(d.cache[e][c]=a.data,m(a.data))},complete(){d.xhr=null;a.classList.remove("tb_autocomplete_loading","tf_loader")}})}},{passive:!0});e.addEventListener("mousedown",function(a){if(1===a.which&&a.target.classList.contains("tb_autocomplete_item")){a.preventDefault();a.stopPropagation();const b=this.previousElementSibling; b.value=a.target.getAttribute("data-value");b.blur();x.triggerEvent(b,"change")}});return b}},file:{_frames:{},clicked:null,browse(a,b,c,d){const e=this;a.addEventListener("click",function(a){a.preventDefault();a.stopPropagation();let f;void 0!==e._frames[d]?f=e._frames[d]:(f=wp.media.frames.file_frame=wp.media({title:c.label.upload_image,library:{type:d},button:{text:c.label.insert_image},multiple:!1}),e._frames[d]=f);f.off("select").on("select",function(){l.ActionBar.disable=!0;const a=f.state().get("selection").first().toJSON(); b.value=a.url;x.triggerEvent(b,"change");l.hasChanged=!0;p(b).trigger("change");const c=z.Lightbox.$lightbox.find("#"+b.id+"_id")[0];void 0!==c&&(c.value=a.id)});f.on("close",function(){l.ActionBar.disable=!0;setTimeout(function(){l.ActionBar.disable=null},5)});f.open()});"image"===d&&b.addEventListener("change",function(b){l.hasChanged=!0;e.setImage(a,this.value.trim())},{passive:!0})},setImage(a,b){for(;a.firstChild;)a.removeChild(a.firstChild);if(b){const c=h.createElement("img");c.width=40;c.height= 40;c.src=b;a.appendChild(c)}},update(a,b,c){a=ThemifyBuilderCommon.Lightbox.$lightbox[0].querySelector("#"+a);null!==a&&(void 0===b&&(b=""),a.value=b,this.setImage(a.parentNode.getElementsByClassName("thumb_preview")[0],b))},render(a,b,c){const d=h.createElement("div"),e=h.createElement("input"),f=h.createElement("a"),g=h.createElement("span"),k=c.getStyleVal(b.id);let m;e.type="text";e.className="tb_uploader_input";e.required=!0;e.setAttribute("pattern",/.*\S.*/.source);e.setAttribute("autocomplete", "off");!0===c.is_repeat?(e.className+=!0===c.is_sort?" tb_lb_sort_child":" tb_lb_option_child",m=Math.random().toString(36).substr(2,7),e.dataset.inputId=b.id):(e.className+=" tb_lb_option",m=b.id);e.id=m;void 0!==k&&(e.value=k);g.className="tb_clear_input tf_close";f.className="tb_media_uploader tb_upload_btn thumb_preview tf_plus_icon";f.href="#";f.dataset.libraryType=a;f.title=c.label.browse_image;d.className="tb_uploader_wrapper";d.appendChild(c.initControl(e,b));d.appendChild(g);d.appendChild(f); "image"===a&&this.setImage(f,k);this.browse(f,e,c,a);void 0!==b.after&&d.appendChild(c.after(b));void 0!==b.description&&d.appendChild(c.description(b.description));void 0!==b.tooltip&&d.appendChild(c.tooltip(b.tooltip));if(null===this.clicked&&!0===c.is_new&&"setting"===c.clicked&&("image"===c.type||"pro-image"===c.type)){this.clicked=!0;const a=this;c.afterRun.push(function(){f.click();a.clicked=null})}return d}},image:{render(a,b){return b.file.render("image",a,b)}},video:{render(a,b){return b.file.render("video", a,b)}},audio:{render(a,b){return b.file.render("audio",a,b)}},icon_radio:{controlChange(a){a.addEventListener("click",function(b){b.preventDefault();b.stopImmediatePropagation();b.target!==a&&(b=b.target.closest("label").getElementsByTagName("input")[0],!0===b.checked?(b.checked=!1,b.value=void 0):(b.checked=!0,b.value=b.getAttribute("data-value")),l.hasChanged=!0,x.triggerEvent(b,"change"))})},render(a,b){return b.radioGenerate("icon_radio",a)}},radio:{controlChange(a){var b=null;a.classList.contains("tb_radio_dnd")&& (b=a.closest(".tb_repeatable_field_content"));null===b&&(b=a.closest(".tb_tab"),null===b&&(b=a.closest(".tb_expanded_opttions"),null===b&&(b=z.Lightbox.$lightbox[0])));const c=a.parentNode.parentNode.getElementsByTagName("input"),d=a.value;a=b.getElementsByClassName("tb_group_element_"+d);for(let a=c.length-1;-1<a;--a){var e=c[a].value;if(d!==e){e=b.getElementsByClassName("tb_group_element_"+e);for(let a=e.length-1;-1<a;--a)e[a].style.display="none"}}for(b=a.length-1;-1<b;--b)a[b].style.display="block"}, update(a,b,c){c=w.document.getElementById(a);if(null!==c){a=c.getElementsByTagName("input");const d=c.classList.contains("tb_icon_radio");let e=null;for(let c=a.length-1;-1<c;--c)if(a[c].value===b){e=a[c];break}null===e&&(b=c.dataset["default"],void 0!==b&&(e=c.querySelector('[value="'+b+'"]')),!1===d&&null===e&&(e=a[0]));if(null!==e)e.checked=!0,!1===d&&c.classList.contains("tb_option_radio_enable")&&this.controlChange(e);else if(!0===d)for(b=a.length-1;-1<b;--b)a[b].checked=!1}},render(a,b){return b.radioGenerate("radio", a)}},icon_checkbox:{render(a,b){return b.checkboxGenerate("icon_checkbox",a)}},checkbox:{update(a,b,c){c=w.document.getElementById(a);if(null!==c){a=c.getElementsByTagName("input");c=c.classList.contains("tb_option_checkbox_enable");b=b?b.split("|"):[];for(let d=a.length-1;-1<d;--d)a[d].checked=-1!==b.indexOf(a[d].value),!0===c&&this.controlChange(a[d])}},controlChange(a){const b=a.classList.contains("tb_radio_dnd")?a.closest(".tb_repeatable_field_content"):z.Lightbox.$lightbox[0];var c=a.parentNode.parentNode; a=c.getElementsByTagName("input");c=c.classList.contains("tb_option_checkbox_revert");for(let d=a.length-1;-1<d;--d){let e=b.getElementsByClassName("tb-checkbox_element_"+a[d].value),f=a[d].checked;for(let a=e.length-1;-1<a;--a)e[a].classList.toggle("_tb_hide_binding",!(!0===c&&!1===f||!1===c&&!0===f))}},render(a,b){return b.checkboxGenerate("checkbox",a)}},radioGenerate(a,b){const c=h.createDocumentFragment(),d=h.createElement("div");a="icon_radio"===a;const e=this.getOptions(b),f=this.getStyleVal(b.id), g=!0===b.option_js,k=[],m=this;let l=null,q=void 0!==b["default"]?b.default:!1,n;d.className="tb_radio_input_container";d.setAttribute("tabIndex","-1");!0===g&&(d.className+=" tb_option_radio_enable");!0===a&&(d.className+=" tb_icon_radio",l=void 0===b.no_toggle);!0===this.is_repeat?(d.className+=!0===this.is_sort?" tb_lb_sort_child":" tb_lb_option_child",n=Math.random().toString(36).substr(2,7),d.dataset.inputId=b.id):(d.className+=" tb_lb_option",d.id=n=b.id);!1!==q?d.dataset["default"]=q:!1=== a&&void 0===f&&(q=e[0].value);void 0!==b.before&&c.appendChild(h.createTextNode(b.before));for(let c=0,l=e.length;c<l;++c){let l=h.createElement("label"),u=h.createElement("input");u.type="radio";u.name=n;u.value=e[c].value;!0===a&&u.setAttribute("data-value",e[c].value);!0===this.is_repeat&&(u.className="tb_radio_dnd");void 0!==b["class"]&&(u.className+=!0===this.is_repeat?" "+b.class:b.class);!0===e[c].disable&&(u.disabled=!0);if(f===e[c].value||void 0===f&&q===e[c].value)u.checked=!0,!0===g&&k.push(u); l.appendChild(u);!0===g&&u.addEventListener("change",function(){this.parentNode.parentNode.blur();m.radio.controlChange(this)},{passive:!0});if(!0===a){if(void 0!==e[c].icon){var t=h.createElement("span");t.className="tb_icon_wrapper";t.innerHTML=e[c].icon;l.insertAdjacentElement("beforeend",t)}void 0!==e[c].label_class&&(l.className+=e[c].label_class);void 0!==e[c].name&&(t=h.createElement("span"),t.className="themify_tooltip",t.textContent=e[c].name,l.appendChild(t))}else void 0!==e[c].name&&(t= h.createElement("span"),t.textContent=e[c].name,l.appendChild(t));d.appendChild(l);void 0!==b.new_line&&d.appendChild(h.createElement("br"));this.initControl(u,b)}d.addEventListener("click",function(a){"LABEL"===a.target.parentNode.tagName&&this.blur()},{passive:!0});c.appendChild(d);void 0!==b.after&&c.appendChild(m.after(b));void 0!==b.description&&c.appendChild(m.description(b.description));!0===a&&!0===l&&m.icon_radio.controlChange(d);!0===g&&this.radioChange.push(function(){for(let a=0,b=k.length;a< b;++a)m.radio.controlChange(k[a])});return c},checkboxGenerate(a,b){const c=h.createDocumentFragment(),d=h.createElement("div"),e=this.getOptions(b);a="icon_checkbox"===a;const f=!0===b.option_js,g=void 0===b.new_line,k=this,m=[];let u=this.getStyleVal(b.id),q=null,n=null;d.className="themify-checkbox";!0===f&&(d.className+=" tb_option_checkbox_enable",void 0!==b.reverse&&(d.className+=" tb_option_checkbox_revert"));!0===this.is_repeat?(d.className+=!0===this.is_sort?" tb_lb_sort_child":" tb_lb_option_child", d.dataset.inputId=b.id):(d.className+=" tb_lb_option",d.id=b.id);void 0!==b.wrap_checkbox&&(d.className+=" "+b.wrap_checkbox);void 0===u?void 0!==b["default"]&&(q=b["default"],n=Array.isArray(q)):!1!==u&&(u=u.split("|"));!0===a&&(d.className+=" tb_icon_checkbox");void 0!==b.before&&c.appendChild(h.createTextNode(b.before));for(let c=0,r=e.length;c<r;++c){let t=h.createElement("label"),r=h.createElement("input");r.type="checkbox";r.className="tb-checkbox";r.value=e[c].name;!0===this.is_repeat&&(r.className+= !0===this.is_sort?" tb_lb_sort_child":" tb_lb_option_child");void 0!==b["class"]&&(r.className+=" "+b.class);if(void 0!==u&&!1!==u&&-1!==u.indexOf(e[c].name)||q===e[c].name||!0===n&&-1!==q.indexOf(e[c].name))r.checked=!0;!0===f&&(r.addEventListener("change",function(){k.checkbox.controlChange(this)},{passive:!0}),m.push(r));"hide_anchor"===b.id&&l.Utils.changeOptions(r,"hide_anchor");!1===g&&(t.className="pad-right");t.appendChild(r);if(!0===a){if(t.insertAdjacentHTML("beforeend",e[c].icon),void 0!== e[c].value){let a=h.createElement("span");a.className="themify_tooltip";a.textContent=e[c].value;t.appendChild(a)}}else void 0!==e[c].value&&t.appendChild(h.createTextNode(e[c].value));d.appendChild(t);void 0!==e[c].help&&d.appendChild(this.help(e[c].help));!0===g&&d.appendChild(h.createElement("br"));this.initControl(r,b)}"hide_anchor"===b.id&&d.addEventListener("click",function(a){a.stopPropagation()});c.appendChild(d);void 0!==b.after&&(void 0!==b.label&&""!==b.label||void 0===b.help||""===b.help? c.appendChild(this.after(b)):(d.className+=" contains-help",d.appendChild(this.after(b))));void 0!==b.description&&c.appendChild(this.description(b.description));!0===f&&this.afterRun.push(function(){for(let a=0,b=m.length;a<b;++a)k.checkbox.controlChange(m[a])});return c},date:{loaded:null,render(a,b){const c=h.createDocumentFragment(),d=h.createElement("input"),e=h.createElement("button"),f=this,g=function(){const b=w.jQuery.fn.themifyDatetimepicker?w.jQuery.fn.themifyDatetimepicker:w.jQuery.fn.datetimepicker; if(b){var c=void 0!==a.picker?a.picker:{};e.addEventListener("click",function(a){a.preventDefault();a.stopPropagation();d.value="";d.dispatchEvent(new Event("change"));this.style.display="none"});b.call(p(d),{showButtonPanel:!0,changeYear:!0,dateFormat:c.dateformat||"yy-mm-dd",timeFormat:c.timeformat||"HH:mm:ss",stepMinute:5,stepSecond:5,controlType:c.timecontrol||"select",oneLine:!0,separator:c.timeseparator||" ",onSelect(a){e.style.display=""===a?"none":"block";d.dispatchEvent(new Event("change"))}, beforeShow(){w.document.getElementById("ui-datepicker-div").classList.add("themify-datepicket-panel")}})}};d.type="text";d.autocomplete="off";d.className="themify-datepicker";!0===b.is_repeat?(d.className+=!0===b.is_sort?" tb_lb_sort_child":" tb_lb_option_child",d.dataset.inputId=a.id):(d.className+=" tb_lb_option",d.id=a.id);d.readonly=!0;e.className="themify-datepicker-clear tf_close";e.textContent=b.label.clear_date;void 0!==b.values[a.id]&&(d.value=b.values[a.id]);void 0!==a["class"]&&(d.className+= " "+a.class);d.value||(e.style.display="none");c.appendChild(b.initControl(d,a));c.appendChild(e);void 0!==a.after&&c.appendChild(b.after(a));void 0!==a.description&&c.appendChild(b.description(a.description));null===this.loaded?b.afterRun.push(function(){w.Themify.LoadCss(themifyBuilder.meta_url+"css/jquery-ui-timepicker.min.css",themify_vars.version);w.Themify.LoadAsync(themifyBuilder.includes_url+"js/jquery/ui/datepicker.min.js",function(){w.Themify.LoadAsync(themifyBuilder.meta_url+"js/jquery-ui-timepicker.min.js", function(){f.loaded=!0;setTimeout(g,10)},themify_vars.version,null,function(){return void 0!==w.jQuery.fn.themifyDatetimepicker||void 0!==w.jQuery.fn.datetimepicker})},themify_vars.wp,null,function(){return void 0!==w.jQuery.fn.datepicker})}):b.afterRun.push(g);return c}},gradient:{controlChange(a,b,c,d,e,f,g,k,h){var m=a.getStyleVal(f.id);if(void 0===m||""===m)m=180;let q=!1,n=p(b),t=a.getStyleVal(c.id),r={angle:m,onChange(a,b){q&&(a=b="");"visual"===l.mode&&x.triggerEvent(c,"themify_builder_gradient_change", {val:b});c.value=a;l.hasChanged=!0},onInit(){b.style.display="block"}};t&&(r.gradient=t,c.value=t);f.value=m;m=a.getStyleVal(e.id);if(void 0===m||""===m)m="linear";e.value=m;r.type=m;g.checked&&(r.circle=!0);h||n.ThemifyGradient(r);const y=n.data("themifyGradient"),v=function(a){let b=f.parentNode;b.classList.contains("tb_angle_container")||(b=f);"radial"===a?(k.style.display=b.style.display="none",g.parentNode.style.display=""):(k.style.display=b.style.display="",g.parentNode.style.display="none")}; l.Utils.getMouseEvents();h?(y.settings=p.extend({},y.settings,r),y.settings.type=m,y.settings.circle=g.checked,y.isInit=!1,y.update(),y.isInit=!0):(d.addEventListener("click",function(a){a.preventDefault();a.stopImmediatePropagation();q=!0;y.settings.gradient=p.ThemifyGradient.default;y.update();q=!1}),e.addEventListener("change",function(a){a=this.value;y.setType(a);v(a)},{passive:!0}),g.addEventListener("change",function(){y.setRadialCircle(this.checked)},{passive:!0}),f.addEventListener("change", function(){let a=parseInt(this.value);a||(a=0);y.setAngle(a)},{passive:!0}));v(a.getStyleVal(e.id))},update(a,b,c){var d=a+"-gradient";b=w.document.getElementById(d);if(null!==b){const e=w.document.getElementById(d+"-angle");d=w.document.getElementById(d+"-type");a=w.document.getElementById(a+"-circle-radial");const f=a.previousElementSibling;this.controlChange(c,b.previousElementSibling,b,null,d,e,a.getElementsByClassName("tb-checkbox")[0],f,!0)}},render(a,b){const c=h.createElement("div");var d= h.createElement("div");const e=h.createElement("select"),f=["linear","radial"],g=h.createElement("span"),k=h.createElement("div"),m=h.createElement("input"),l=h.createElement("a"),q=this;c.className="themify-gradient-field";void 0!==a.option_js&&(c.className+=" tb_group_element_gradient");d.className="selectwrapper";e.className="tb_lb_option themify-gradient-type";e.id=a.id+"-gradient-type";g.textContent=b.label.rotation;k.className="tb_gradient_container";k.tabIndex=-1;m.type="hidden";m.className= "themify-gradient tb_lb_option";m.dataset.id=a.id;m.id=a.id+"-gradient";l.className="tb_clear_gradient tf_close";var n=h.createElement("span");n.className="themify_tooltip";n.innerText=b.label.clear_gradient;l.appendChild(n);l.href="#";for(n=0;2>n;++n){let a=h.createElement("option");a.value=f[n];a.textContent=b.label[f[n]];e.appendChild(a)}d.appendChild(e);c.appendChild(d);d=p.extend(!0,{},a);d.id=a.id+"-gradient-angle";const t=b.angle.render(d,b);c.appendChild(t);c.appendChild(g);c.appendChild(b.checkboxGenerate("checkbox", {id:a.id+"-circle-radial",options:[{name:"1",value:b.label.circle_radial}]}));c.appendChild(k);c.appendChild(m);c.appendChild(l);b.initControl(m,a);b.afterRun.push(function(){q.controlChange(b,k,m,l,e,t.getElementsByClassName("tb_angle_input")[0],c.getElementsByClassName("tb-checkbox")[0],g)});return c}},fontColor:{update(a,b,c){c.radio.update(a,c.getStyleVal(a),c)},render(a,b){a.isFontColor=!0;const c=b.radioGenerate("radio",{id:a.id,type:"radio",option_js:!0,isFontColor:!0,options:[{value:a.s+"_solid", name:b.label.solid},{value:a.g+"_gradient",name:b.label.gradient}]}),d=c.querySelector(".tb_lb_option"),e=p.extend(!0,{},a);e.label="";e.type="color";e.id=a.s;e.prop="color";e.wrap_class="tb_group_element_"+a.s+"_solid";const f=b.create([e]);e.id=a.g;e.wrap_class="tb_group_element_"+a.g+"_gradient";e.type="gradient";e.prop="background-image";const g=b.create([e]);b.afterRun.push(function(){const a=d.parentNode.closest(".tb_field");a.parentNode.insertBefore(f,a.nextElementSibling);a.parentNode.insertBefore(g, a.nextElementSibling)});return c}},imageGradient:{update(a,b,c){c.radio.update(a+"-type",c.getStyleVal(a+"-type"),c);c.file.update(a,b,c);c.gradient.update(a,b,c);a=w.document.getElementById(a);if(null!==a){b=a.closest(".tb_tab");a=b.getElementsByClassName("tb_image_options");b=b.getElementsByClassName("tb_gradient_image_color")[0].getElementsByClassName("minicolors-input")[0].id;c.color.update(b,c.getStyleVal(b),c);for(let d=0;d<a.length;++d)b=a[d].getElementsByClassName("tb_lb_option")[0].id,c.select.update(b, c.getStyleVal(b),c)}},render(a,b){const c=h.createElement("div"),d=h.createElement("div");c.className="tb_image_gradient_field";d.className="tb_group_element_image";c.appendChild(b.radioGenerate("radio",{type:a.type,id:a.id+"-type",options:[{name:b.label.image,value:"image"},{name:b.label.gradient,value:"gradient"}],option_js:!0}));const e=p.extend(!0,{},a);e.type="image";e.class="xlarge";d.appendChild(b.file.render("image",p.extend(!0,{},e),b));c.appendChild(d);e.type="gradient";delete e.class;delete e.binding; c.appendChild(b.gradient.render(e,b));b.afterRun.push(function(){const a={wrap_class:"tb_group_element_image",type:"group",options:[]};e.prop="background-color";e.wrap_class="tb_gradient_image_color";e.label=b.label.bg_c;e.type="color";e.id=e.colorId;a.options.push(p.extend({},e));e.prop="background-mode";e.wrap_class="tb_image_options";e.label=b.label.b_r;e.repeat=!0;e.type="select";e.id=e.repeatId;a.options.push(p.extend({},e));e.prop="background-position";e.wrap_class="tb_image_options";e.label= b.label.b_p;e.position=!0;e.type="position_box";e.id=e.posId;delete e.repeat;a.options.push(p.extend({},e));const c=d.parentNode.closest(".tb_field");c.parentNode.insertBefore(b.create([a]),c.nextElementSibling)});return c}},layout:{controlChange(a){a.addEventListener("click",function(b){b.preventDefault();b.stopPropagation();if(b.target!==a&&(b=b.target.closest("a"),null!==b)){const a=this.getElementsByClassName("tfl-icon");for(let b=a.length-1;-1<b;--b)a[b].classList.remove("selected");b.classList.add("selected"); l.hasChanged=!0;x.triggerEvent(this,"change",{val:b.id})}})},update(a,b,c){c=w.document.getElementById(a);if(null!==c){a=c.getElementsByClassName("tfl-icon");for(let c=a.length-1;-1<c;--c)b===a[c].id?a[c].classList.add("selected"):a[c].classList.remove("selected");void 0===b&&(b=c.dataset["default"],b=void 0===b?a[0]:b.querySelector("#"+b),b.classList.add("selected"))}},render(a,b){const c=h.createElement("div");let d=b.getOptions(a);var e=b.getStyleVal(a.id);!0===a.color&&!0===a.transparent&&(d= d.slice(),d.push({img:"transparent",value:"transparent",label:b.label.transparent}));c.className="themify-layout-icon";!0===b.is_repeat?(c.className+=!0===b.is_sort?" tb_lb_sort_child":" tb_lb_option_child",c.dataset.inputId=a.id):(c.className+=" tb_lb_option",c.id=a.id);void 0!==a["class"]&&(c.className+=" "+a.class);void 0===e&&(e=themifyBuilder.modules[b.type],e=void 0!==e&&void 0!==e.defaults&&e.defaults[a.id]?e.defaults[a.id]:d[0].value);for(let b=0,g=d.length;b<g;++b){let f=h.createElement("a"), g=h.createElement("span"),l;f.href="#";f.className="tfl-icon";f.id=d[b].value;e===d[b].value.toString()&&(f.className+=" selected");g.className="themify_tooltip";g.textContent=d[b].label;"sprite"===a.mode&&-1===d[b].img.indexOf(".png")?(l=h.createElement("span"),l.className="tb_sprite",-1!==d[b].img.indexOf("http")?l.style.backgroundImage="url("+d[b].img+")":l.className+=" tb_"+d[b].img):(l=h.createElement("img"),l.alt=d[b].label,l.src=-1!==d[b].img.indexOf("http")?d[b].img:themifyBuilder.builder_url+ "/editor/img/"+d[b].img);f.appendChild(l);f.appendChild(g);c.appendChild(f)}this.controlChange(c);"row"!==b.component||"row_width"!==a.id&&"row_height"!==a.id?b.initControl(c,a):l.Utils.changeOptions(c,a.type);return c}},layoutPart:{data:[],get(a){const b=this;p.ajax({type:"POST",url:themifyBuilder.ajaxurl,dataType:"json",data:{action:"tb_get_library_items",nonce:themifyBuilder.tb_load_nonce,pid:themifyBuilder.post_ID},beforeSend(a){z.showLoader("show")},success(c){z.showLoader("hide");b.data=c;a()}, error(){z.showLoader("error")}})},render(a,b){function c(){const c=b.values[a.id],e=null!==l.Forms.LayoutPart.id?l.Forms.LayoutPart.id.toString():null;m.appendChild(h.createElement("option"));for(let a=0,b=d.data.length;a<b;++a)if(e!==d.data[a].id.toString()){let b=h.createElement("option");b.value=d.data[a].post_name;b.textContent=d.data[a].post_title;c===d.data[a].post_name&&(b.selected=!0);m.appendChild(b)}}const d=this,e=h.createDocumentFragment(),f=b.select.render(a,b),g=h.createElement("a"), k=h.createElement("a"),m=f.querySelector("select");0===d.data.length?d.get(c):c();e.appendChild(f);g.target=k.target="_blank";g.className="tb_icon_btn";g.href=a.edit_url;k.href=a.add_url;k.className="add_new tf_plus_icon tb_icon_btn";g.appendChild(l.Utils.getIcon("ti-folder"));g.appendChild(h.createTextNode(b.label.mlayout));k.appendChild(h.createTextNode(b.label.nlayout));e.appendChild(h.createElement("br"));e.appendChild(k);e.appendChild(g);return e}},separator:{render(a,b){const c=void 0!==b.label[a.label]? b.label[a.label]:a.label;if(void 0!==c){b=void 0!==a.wrap_class?h.createElement("div"):h.createDocumentFragment();const d=h.createElement("h4");d.textContent=c;b.appendChild(h.createElement("hr"));b.appendChild(d)}else void 0!==a.html?(b=h.createElement("div"),b.innerHTML=a.html,b=b.firstChild):b=h.createElement("hr");void 0!==a.wrap_class&&(b.className=a.wrap_class);return b}},multiColumns:{render(a,b){const c=[],d=[{id:a.id+"_gap",label:b.label.c_g,type:"range",prop:"column-gap",selector:a.selector, wrap_class:"tb_multi_columns_wrap",units:{px:{max:500}}},{type:"multi",wrap_class:"tb_multi_columns_wrap",label:b.label.c_d,options:[{type:"color",id:a.id+"_divider_color",prop:"column-rule-color",selector:a.selector},{type:"range",id:a.id+"_divider_width",class:"tb_multi_columns_width",prop:"column-rule-width",selector:a.selector,units:{px:{max:500}}},{type:"select",id:a.id+"_divider_style",options:b.static.border,prop:"column-rule-style",selector:a.selector}]}];for(let a=0;7>a;++a)c[a]=0===a?"": a;a.options=c;a=p.extend(!0,{},a);a.type="select";a=b.select.render(a,b);const e=a.querySelector("select");b.afterRun.push(function(){const a=e.closest(".tb_field");a.parentNode.insertBefore(b.create(d),a.nextElementSibling)});return a}},expand:{render(a,b){const c=h.createElement("fieldset"),d=h.createElement("div"),e=h.createElement("div"),f=void 0!==b.label[a.label]?b.label[a.label]:a.label;c.className="tb_expand_wrap";e.className="tb_style_toggle tb_closed";d.className="tb_expanded_opttions"; e.appendChild(h.createTextNode(f));e.appendChild(l.Utils.getIcon("ti-angle-up"));c.appendChild(e);c.appendChild(d);e.addEventListener("click",function(c){c.preventDefault();c.stopImmediatePropagation();void 0===this.dataset.done&&(this.dataset.done=!0,d.appendChild(b.create(a.options)),"setting"===b.clicked&&b.setUpEditors(),b.callbacks(),x.body.triggerHandler("tb_options_expand",[d]));this.classList.contains("tb_closed")?this.classList.remove("tb_closed"):this.classList.add("tb_closed")});return c}}, gallery:{file_frame:null,cache:{},init(a,b){const c=wp.media.gallery.shortcode,d=this,e=b.value.trim(),f=function(a,c){const d=h.createElement("div");var e=b.parentNode.getElementsByClassName("tb_shortcode_preview")[0];d.className="tb_shortcode_preview";void 0!==e&&e.parentNode.removeChild(e);for(let b=0,f=a.length;b<f;++b){e=h.createElement("img");e.width=e.height=50;if(!0===c)e.src=a[b];else{let c=a[b].attributes;e.src=c.sizes.thumbnail?c.sizes.thumbnail.url:c.url}d.appendChild(e)}b.parentNode.insertBefore(d, b.nextElementSibling)};0<e.length&&(void 0!==this.cache[e]?f(this.cache[e],!0):p.ajax({type:"POST",url:themifyBuilder.ajaxurl,dataType:"json",data:{action:"tb_load_shortcode_preview",tb_load_nonce:themifyBuilder.tb_load_nonce,shortcode:e},success(a){f(a,!0);d.cache[e]=a}}));a.addEventListener("click",function(a){a.preventDefault();a.stopPropagation();null===d.file_frame?(d.file_frame=wp.media.frames.file_frame=wp.media({frame:"post",state:"gallery-library",library:{type:"image"},title:wp.media.view.l10n.editGalleryTitle, editing:!0,multiple:!0,selection:!1}),d.file_frame.el.classList.add("themify_gallery_settings")):d.file_frame.options.selection.reset();wp.media.gallery.shortcode=function(a){const b=a.props.toJSON(),d=_.pick(b,"orderby","order");a.gallery&&Object.assign(d,a.gallery.toJSON());d.ids=a.pluck("id");b.uploadedTo&&(d.id=b.uploadedTo);d._orderbyRandom&&(d.orderby="rand",delete d._orderbyRandom);d.ids&&"post__in"===d.orderby&&delete d.orderby;for(let a in wp.media.gallery.defaults)wp.media.gallery.defaults[a]=== d[a]&&delete d[a];delete d._orderByField;a=new w.wp.shortcode({tag:"gallery",attrs:d,type:"single"});wp.media.gallery.shortcode=c;return a};a=b.value.trim();0<a.length?(d.file_frame=wp.media.gallery.edit(a),d.file_frame.state("gallery-edit")):(d.file_frame.state("gallery-library"),d.file_frame.open(),d.file_frame.$el.find(".media-menu .media-menu-item").last().trigger("click"));a=function(a){const c=wp.media.gallery.shortcode(a).string().slice(1,-1);b.value="["+c+"]";f(a.models);x.triggerEvent(b, "change");l.hasChanged=!0};d.file_frame.off("update",a).on("update",a)})},render(a,b){const c=h.createDocumentFragment(),d=h.createElement("a"),e=this;let f=void 0!==a.class?a.class:"";d.href="#";d.className="builder_button tb_gallery_btn";d.textContent=b.label.add_gallery;a.class=f+" tb_shortcode_input";c.appendChild(b.textarea.render(a,b));c.appendChild(d);b.afterRun.push(function(){e.init(d,d.previousElementSibling);!0===b.is_new&&"gallery"===b.type&&"setting"===b.clicked&&d.click()});return c}}, textarea:{render(a,b){const c=h.createDocumentFragment(),d=h.createElement("textarea"),e=b.getStyleVal(a.id);!0===b.is_repeat?(d.className=!0===b.is_sort?"tb_lb_sort_child":"tb_lb_option_child",d.dataset.inputId=a.id):(d.className="tb_lb_option",d.id=a.id);d.className+=" "+(void 0!==a["class"]?a.class:"xlarge");void 0!==e&&(d.value=e);void 0!==a.rows&&(d.rows=a.rows);c.appendChild(b.initControl(d,a));void 0!==a.after&&c.appendChild(b.after(a));void 0!==a.description&&c.appendChild(b.description(a.description)); return c}},address:{render(a,b){return b.textarea.render(a,b)}},wp_editor:{render(a,b){const c=h.createElement("div"),d=h.createElement("div"),e=h.createElement("div"),f=h.createElement("button"),g=h.createElement("span"),k=h.createElement("div"),m=h.createElement("button"),l=h.createElement("button"),q=h.createElement("div"),n=h.createElement("div"),t=h.createElement("textarea");let r;c.className="wp-core-ui wp-editor-wrap tmce-active";t.className="tb_lb_wp_editor fullwidth";!0===b.is_repeat?(r= Math.random().toString(36).substr(2,7),t.className+=!0===b.is_sort?" tb_lb_sort_child":" tb_lb_option_child",t.dataset.inputId=a.id,!1!==a.control&&(void 0===a.control&&(a.control={}),a.control.repeat=!0)):(t.className+=" tb_lb_option",r=a.id);t.id=r;c.id="wp-"+r+"-wrap";d.id="wp-"+r+"-editor-tools";d.className="wp-editor-tools";e.id="wp-"+r+"-media-buttons";e.className="wp-media-buttons";f.type="button";f.className="button insert-media add_media";g.className="wp-media-buttons-icon";k.className="wp-editor-tabs"; m.type="button";m.className="wp-switch-editor switch-tmce";m.id=r+"-tmce";m.dataset.wpEditorId=r;m.textContent=b.label.visual;l.type="button";l.className="wp-switch-editor switch-html";l.id=r+"-html";l.dataset.wpEditorId=r;l.textContent=b.label.text;q.id="wp-"+r+"-editor-container";q.className="wp-editor-container";n.id="qt_"+r+"_toolbar";n.className="quicktags-toolbar";void 0!==a["class"]&&(t.className+=" "+a.class);void 0!==b.values[a.id]&&(t.value=b.values[a.id]);t.rows=12;t.cols=40;q.appendChild(t); q.appendChild(n);k.appendChild(m);k.appendChild(l);f.appendChild(g);f.appendChild(h.createTextNode(b.label.add_media));e.appendChild(f);d.appendChild(e);d.appendChild(k);c.appendChild(d);c.appendChild(q);b.editors.push({el:t,data:a});return c}},select:{dataset_cache:{},update(a,b,c){a=w.document.getElementById(a);null!==a&&(void 0!==b?a.value=b:void 0!==a[0]&&(a[0].selected=!0))},make_options:function(a,b,c){const d=h.createDocumentFragment();c=c.getOptions(a);for(let e in c){let f=h.createElement("option"); f.value=e;f.text=c[e];void 0!==a.binding&&void 0!==a.binding[e]&&void 0!==a.binding[e].responsive&&void 0!==a.binding[e].responsive.disabled&&-1!==a.binding[e].responsive.disabled.indexOf(a.id)&&(f.className="responsive_disable");if(b===e||void 0===b&&e===a.default)f.selected=!0;d.appendChild(f)}return d},render(a,b){const c=this,d=h.createElement("div"),e=h.createElement("select"),f=h.createDocumentFragment(),g=b.getStyleVal(a.id);d.className="selectwrapper";!0===b.is_repeat?(e.className=!0===b.is_sort? "tb_lb_sort_child":"tb_lb_option_child",e.dataset.inputId=a.id):(e.className="tb_lb_option",e.id=a.id);void 0!==a["class"]&&(e.className+=" "+a.class);const k=function(a){if(a.optgroup){a=b.getOptions(a);for(let d in a)if(void 0!==a[d].label){let f=h.createElement("optgroup");f.setAttribute("label",a[d].label);f.appendChild(c.make_options(a[d],g,b));e.appendChild(f)}else e.appendChild(c.make_options(a[d],g,b))}else e.appendChild(c.make_options(a,g,b))};void 0!==a.dataset?void 0!==c.dataset_cache[a.dataset]? k(c.dataset_cache[a.dataset]):p.ajax({type:"POST",url:themifyBuilder.ajaxurl,dataType:"json",data:{action:"tb_get_select_dataset",dataset:a.dataset,nonce:themifyBuilder.tb_load_nonce,pid:themifyBuilder.post_ID},beforeSend(a){z.showLoader("show")},success(b){b.success&&(z.showLoader("hide"),c.dataset_cache[a.dataset]=b.data,k(b.data))},error(){z.showLoader("error")}}):k(a);d.appendChild(b.initControl(e,a));f.appendChild(d);void 0!==a.after&&f.appendChild(b.after(a));void 0!==a.description&&f.appendChild(b.description(a.description)); void 0!==a.tooltip&&f.appendChild(b.tooltip(a.tooltip));return f}},font_select:{loaded_fonts:[],fonts:[],safe:[],google:[],cf:[],updateFontVariant(a,b,c,d){if(b){d=""===d||void 0===d?void 0!==this.google[a]?"google":"cf":d;d="webfont"===d?"fonts":d;var e=b.closest(".tb_field");if(void 0===this[d][a]||void 0===this[d][a].v||0===this[d][a].v.length)e.classList.add("_tb_hide_binding");else{var f=this[d][a].v;c=c.getStyleVal(b.id);void 0===c&&(c="google"===d?"regular":"normal");for(b.dataset.selected= a;null!==b.firstChild;)b.removeChild(b.firstChild);e.classList.remove("_tb_hide_binding");for(let d=0,e=f.length;d<e;++d)a=h.createElement("option"),a.value=a.textContent=f[d],f[d]===c&&(a.selected=!0),b.appendChild(a)}}},loadGoogleFonts(a){a=p.unique(a.split("|"));const b={google:[],cf:[]},c=[],d=this,e=function(){for(let a=c.length-1;-1<a;--a)-1===d.loaded_fonts.indexOf(c[a])&&d.loaded_fonts.push(c[a]);x.body.triggerHandler("tb_font_stylesheet_loaded",[d,c])};for(let e=a.length-1;-1<e;--e)if(a[e]&& -1===this.loaded_fonts.indexOf(a[e])&&(-1===b.google.indexOf(a[e])||-1===b.cf.indexOf(a[e]))){var f=a[e].split(":"),g="regular"===f[1]||"normal"===f[1]||"italic"===f[1]||parseInt(f[1])?f[1]:"400,700";g=f[0].split(" ").join("+")+":"+g;-1===this.loaded_fonts.indexOf(g)&&(f=void 0!==d.cf[f[0]]?"cf":"google",g+="google"===f?":latin,latin-ext":"",b[f].push(g),c.push(g))}0<b.google.length&&x.LoadCss(window.location.protocol+"//fonts.googleapis.com/css?family="+encodeURI(b.google.join("|"))+"&display=swap", !1,null,null,e);0<b.cf.length&&x.LoadCss(themifyBuilder.cf_api_url+encodeURI(b.cf.join("|")),!1,null,null,e)},controlChange(a,b,c,d){const e=this,f=p(a).comboSelect({comboClass:"themify-combo-select",comboArrowClass:"themify-combo-arrow",comboDropDownClass:"themify-combo-dropdown",inputClass:"themify-combo-input",disabledClass:"themify-combo-disabled",hoverClass:"themify-combo-hover",selectedClass:"themify-combo-selected",markerClass:"themify-combo-marker"}).parent("div");f[0].addEventListener("click", function(b){b=b.target;if(b.classList.contains("themify-combo-item")){l.hasChanged=!0;b=b.dataset.value;let c=this.querySelector('option[value="'+b+'"]');c&&(c=c.dataset.type);"cf"===c&&b&&-1===e.loaded_fonts.indexOf(b)&&e.loadGoogleFonts(b);e.updateFontVariant(b,a.closest(".tb_tab").getElementsByClassName("font-weight-select")[0],d,c);setTimeout(function(){x.triggerEvent(a,"change")},10)}},{passive:!0});f[0].addEventListener("mouseover",function(a){a=a.target;if(a.classList.contains("themify-combo-item")){let f= a.dataset.value;if(f){var d=p(a);if(d.is(":visible")&&("default"===f&&(f="inherit"),b.style.top=d.position().top+30+"px",b.style.fontFamily=f,b.style.display="block","inherit"!==f&&!a.classList.contains("tb_font_loaded"))){a.classList.add("tb_font_loaded");if(-1===e.fonts.indexOf(f)){d=function(a){e.fonts.push(a);c.classList.remove("themify_show_wait")};c.classList.add("themify_show_wait");let a=this.querySelector('option[value="'+f+'"]');a&&(a=a.dataset.type);if(a&&"webfont"!==a){let b="";"google"=== a?b=window.location.protocol+"//fonts.googleapis.com/css?family="+encodeURI(f)+"&display=swap":"cf"===a&&(b=themifyBuilder.cf_api_url+encodeURI(f));""!==b&&w.Themify.LoadCss(b,!1,null,null,d)}else d(f)}a.style.fontFamily=f}}}},{passive:!0});f.trigger("comboselect:open").on("comboselect:close",function(){b.style.display="none"});f[0].getElementsByClassName("themify-combo-arrow")[0].addEventListener("click",function(){b.style.display="none"},{passive:!0})},update(a,b,c){a=w.document.getElementById(a); if(null!==a)if(void 0===b&&(b=""),a.value=b,this.updateFontVariant(b,a.closest(".tb_tab").getElementsByClassName("font-weight-select")[0],c),void 0===a.dataset.init){c=a.getElementsByTagName("optgroup");for(a=h.createElement("option");c[0].firstChild;)c[0].removeChild(c[0].firstChild);for(;c[1].firstChild;)c[1].removeChild(c[1].firstChild);a.value=b;a.selected=!0;void 0!==this.safe[b]?(a.textContent=this.safe[b],c[0].appendChild(a)):void 0!==this.google[b]?(a.textContent=this.google[b].n,c[1].appendChild(a)): void 0!==this.cf[b]?(a.textContent=this.cf[b].n,c[2].appendChild(a)):(a.textContent=b,c[0].appendChild(a))}else a.parentNode.getElementsByClassName("themify-combo-input")[0].value=b},render(a,b){const c=h.createElement("div"),d=h.createElement("select"),e=h.createElement("span"),f=h.createElement("span"),g=h.createDocumentFragment();var k=h.createElement("option");const m=b.getStyleVal(a.id),l=this,q={safe:b.label.safe_fonts,google:b.label.google_fonts},n=1>Object.keys(this.cf).length;!1===n&&(q.cf= b.label.cf_fonts);c.className="tb_font_preview_wrapper";d.className="tb_lb_option font-family-select";d.id=a.id;e.className="tb_font_preview";f.textContent=b.label.font_preview;k.value="";k.textContent="---";g.appendChild(k);void 0!==a["class"]&&(d.className+=" "+a.class);k=["google","safe"];!1===n&&k.push("cf");for(let a=k.length-1;-1<a;--a){let b=h.createElement("optgroup");b.label=q[k[a]];if(void 0!==m){let c=h.createElement("option");c.value=m;c.selected=!0;c.textContent="cf"===k[a]&&void 0!== this.cf[m]?this.cf[m].n:"safe"===k[a]&&void 0!==this.safe[m]?this.safe[m]:"google"===k[a]&&void 0!==this.google[m]?this.google[m].n:void 0!==this.cf[m]?this.cf[m].n:m;b.appendChild(c)}g.appendChild(b)}c.addEventListener("focusin",function(){var a=l.safe,c=h.createDocumentFragment();const g=d.getElementsByTagName("optgroup");d.dataset.init=!0;if(void 0!==m)for(var k=g.length-1;-1<k;--k)for(;g[k].firstChild;)g[k].removeChild(g[k].firstChild);for(var u in a)k=h.createElement("option"),k.value=u,k.textContent= a[u],k.dataset.type="webfont",m===u&&(k.selected=!0),c.appendChild(k);g[n?0:1].appendChild(c);a=["google"];!1===n&&a.unshift("cf");for(c=a.length-1;-1<c;--c){u=l[a[c]];k=h.createDocumentFragment();for(let b in u){let d=h.createElement("option");d.value=b;d.dataset.type=a[c];d.textContent=u[b].n;m===b&&(d.selected=!0);k.appendChild(d)}g["cf"===a[c]?0:n?1:2].appendChild(k)}l.controlChange(d,e,f,b)},{once:!0,passive:!0});d.appendChild(g);e.appendChild(f);c.appendChild(b.initControl(d,a));c.appendChild(e); b.afterRun.push(function(){const d=b.create([{type:"select",label:"f_w",selector:a.selector,class:"font-weight-select",id:a.id+"_w",prop:"font-weight"}]),e=c.closest(".tb_field"),f=d.querySelector(".tb_field");e.parentNode.insertBefore(d,e.nextElementSibling);l.updateFontVariant(m,f.querySelector(".font-weight-select"),b)});return c}},animation_select:{render(a,b){const c=h.createElement("div"),d=b.static.preset_animation,e=h.createElement("select");b=b.values[a.id];c.className="selectwrapper";e.className= "tb_lb_option";e.id=a.id;e.appendChild(h.createElement("option"));for(let c in d){a=h.createElement("optgroup");a.label=c;for(let e in d[c]){let f=h.createElement("option");f.value=e;f.text=d[c][e];b===e&&(f.selected=!0);a.appendChild(f)}e.appendChild(a)}c.appendChild(e);return c}},select_menu:{data:null,get(a,b){const c=this,d=function(){for(let d in c.data){let e=h.createElement("option");e.value=c.data[d].slug;e.text=c.data[d].name;e.dataset.termid=c.data[d].term_id;b===c.data[d].slug&&(e.selected= !0);a.appendChild(e)}};null===c.data?p.ajax({type:"POST",url:themifyBuilder.ajaxurl,dataType:"json",data:{action:"tb_get_menu",tb_load_nonce:themifyBuilder.tb_load_nonce},success(a){c.data=a;d()}}):d()},render(a,b){const c=h.createDocumentFragment(),d=h.createElement("div"),e=h.createElement("select"),f=h.createElement("small"),g=h.createElement("option"),k=b.values[a.id];d.className="selectwrapper";e.className="select_menu_field";!0===b.is_repeat?(e.className+=!0===b.is_sort?" tb_lb_sort_child": " tb_lb_option_child",e.dataset.inputId=a.id):(e.className+=" tb_lb_option",e.id=a.id);void 0!==a["class"]&&(e.className+=" "+a.class);f.innerHTML=b.label.menu_help;g.value="";g.text=b.label.select_menu;this.get(e,k);d.appendChild(b.initControl(e,a));c.appendChild(g);c.appendChild(d);c.appendChild(h.createElement("br"));c.appendChild(f);return c}},sticky:{render(a,b){const c={},d=l.activeModel.get("element_id"),e=p.extend(!0,{},a);a=a.key;const f=l.Models.Registry.items;for(let b in f){let e=f[b].attributes; if(a===e.elType&&e.element_id!==d){let b="row"===a?e.styling:e.mod_settings;c[e.element_id]="row"===a&&b&&(b.custom_css_id||b.row_anchor)?b.custom_css_id?"#"+b.custom_css_id:"#"+b.row_anchor:"module"===a&&b&&b.custom_css_id?"#"+b.custom_css_id:"row"===a?"Row #"+e.element_id:e.mod_name+" #"+e.element_id}}e.options=c;return b.select.render(e,b)}},selectSearch:{update(a,b,c,d){d=h.createDocumentFragment();let e=null;b.removeAttribute("data-value");b.value="";if(void 0!==c){for(let f in c){let g=h.createElement("div"); null===e&&(e=f);g.dataset.value=f;g.className="tb_search_item";g.textContent=c[f];a===f&&(g.className+=" selected",b.setAttribute("data-value",f),b.value=c[f]);d.appendChild(g)}""===b.value&&null!==e&&(b.value=c[e],b.setAttribute("data-value",e))}return d},events(a,b){a.addEventListener("keyup",function(a){a=b.getElementsByClassName("tb_search_item");const c=this.value.trim(),e=new RegExp(c,"i");for(let b=0,d=a.length;b<d;++b)""===c||e.test(a[b].textContent)?a[b].style.display="block":a[b].style.display= "none"},{passive:!0});b.addEventListener("mousedown",function(b){if(1===b.which&&b.target.classList.contains("tb_search_item")){b.preventDefault();b.stopPropagation();var c=this.getElementsByClassName("tb_search_item");b=b.target;for(let a=c.length-1;-1<a;--a)c[a].classList.remove("selected");b.classList.add("selected");c=b.dataset.value;a.value=b.textContent;a.dataset.value=c;a.blur();a.previousElementSibling.blur();x.triggerEvent(a,"selectElement",{val:c})}})},render(a,b){const c=h.createElement("div"), d=h.createElement("div"),e=h.createElement("input"),f=h.createElement("span"),g=h.createElement("div");c.className="tb_search_wrapper";e.className="tb_search_input";e.autocomplete="off";g.className="tb_search_container tf_scrollbar";!0===b.is_repeat?(e.className+=!0===b.is_sort?" tb_lb_sort_child":" tb_lb_option_child",e.dataset.inputId=a.id):(e.className+=" tb_lb_option",e.id=a.id);void 0!==a["class"]&&(e.className+=" "+a["class"]);f.className="tf_loader";g.tabIndex=1;d.tabIndex=1;d.className="tb_search_arrow"; e.type="text";e.placeholder=(void 0!==a.placeholder?a.placeholder:a.label)+"...";g.appendChild(this.update(b.values[a.id],e,a.options,b));d.appendChild(f);c.appendChild(d);c.appendChild(b.initControl(e,a));c.appendChild(g);void 0!==a.after&&c.appendChild(b.after(a));void 0!==a.description&&c.appendChild(b.description(a.description));void 0!==a.tooltip&&c.appendChild(b.tooltip(a.tooltip));this.events(e,g);return c}},optin_provider:{cache:null,render(a,b){const c=h.createElement("div"),d=this;null=== this.cache?(z.showLoader("show"),p.ajax({type:"POST",url:themifyBuilder.ajaxurl,dataType:"json",data:{action:"tb_optin_get_settings",tb_load_nonce:themifyBuilder.tb_load_nonce},success:function(a){z.showLoader("spinhide");d.cache=a;c.appendChild(b.create(d.cache));b.callbacks()},error(){z.showLoader("error")}})):c.appendChild(b.create(d.cache));return c}},check_map_api:{render(a,b){return themifyBuilder[a.map+"_api"]?h.createElement("span"):b.separator.render({type:"separator",html:"<span>"+themifyBuilder[a.map+ "_api_err"]+"</span>",wrap_class:"tb_group_element_"+a.map},b)}},query_posts:{cacheTypes:null,cacheTerms:[],render(a,b){let c,d;const e=this,f=a.description,g=a.after,k=b.values,m=function(a){const b=[];for(let c in a)b[c]=a[c].name;return b},u=function(a,c,d){const e=a.nextElementSibling;for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(b.selectSearch.update(c,a,d,b))},q=function(b,c,e,f){b.classList.add("tb_search_wait");d&&d.abort();return d=p.ajax({type:"POST",url:themifyBuilder.ajaxurl, dataType:"json",data:{action:"tb_get_post_types",tb_load_nonce:themifyBuilder.tb_load_nonce,type:e,v:c,s:f?f:"",exclude:a.exclude,all:a.all,just_current:a.just_current,id:themifyBuilder.post_ID},complete(){b.classList.remove("tb_search_wait")}})};(function(){let d=p.extend(!0,{},a),t=null;c=h.createElement("div");c.id=a.id?a.id:a.term_id;b.afterRun.push(function(){let n=["id","tax_id","term_id","tag_id"],p=h.createDocumentFragment(),v=null,A=function(c,d,m){const n=m?d+"_"+m:d,r=function(n){if(void 0!== a.term_id||void 0!==a.tag_id){if(a.all){var r=c.closest("."+a.id),q="All"===r.querySelector("#"+a.id).value;r=r.querySelectorAll("."+a.tax_id+",."+a.term_id+",."+a.tag_id);for(var p=r.length-1;-1<p;p--)q?r[p].classList.add("tf_hide"):r[p].classList.remove("tf_hide")}r=void 0===a.tag_id?a.term_id.replace("#tmp_id#",d):a.tag_id;q=c.closest(".tb_input");var y;c.id=r;null===v&&void 0!==k[r]&&(y=k[r].split("|")[0]);y||(y=0);u(c,y,e.cacheTerms[n]);if(m||""===m)c.value=m;if(null===v){n=h.createElement("input"); r=h.createElement("span");p=h.createElement("div");r.innerHTML=b.label.or;n.type="text";n.className="query_category_multiple";p.className="tb_query_multiple_wrap";p.appendChild(r);p.appendChild(n);q.insertBefore(p,q.nextSibling);void 0!==g&&q.appendChild(b.after(g));void 0!==f&&q.appendChild(b.description(f));if(void 0!==a.slug_id){r=q.parentNode;p=b.create([{type:"radio",id:"term_type",label:b.label.query_by,default:void 0===k.term_type&&"post_slug"===k[a.tax_id]?"post_slug":"category",option_js:!0, options:[{value:"all",name:b.label.all_posts},{value:"category",name:b.label.query_term_id},{value:"post_slug",name:b.label.slug_label}]}]);const c=b.create([{id:a.slug_id,type:"text","class":"large",wrap_class:"tb_group_element_post_slug",help:b.label.slug_desc,label:b.label.slug_label}]);r.parentNode.insertBefore(p,r);r.parentNode.appendChild(c)}void 0!==a.sticky_id&&(r=b.create([{type:"toggle_switch",label:b.label.sticky_first,id:a.sticky_id,options:"simple",wrap_class:"tb_group_element_all"}]), q.parentNode.parentNode.appendChild(r));n.addEventListener("change",function(a){x.triggerEvent(c,"queryPosts",{val:y})},{passive:!0});null!==t&&clearTimeout(t);t=setTimeout(function(){b.callbacks()},2)}q.getElementsByClassName("query_category_multiple")[0].value=y;!0===v||b.is_new?x.triggerEvent(c,"queryPosts",{val:y}):ThemifyConstructor.settings=l.Utils.clear(l.Forms.serialize("tb_options_setting"));v=!0}};void 0===e.cacheTerms[n]?q(c.parentNode,d,"terms",m).done(function(a){e.cacheTerms[n]=a;r(n)}): r(n)};for(let c=0,f=n.length;c<f;++c){if(!d[n[c]])continue;d.id=d[n[c]];d.label=b.label["query_"+n[c]];d.type="selectSearch";"term_id"===n[c]?(d.wrap_class="tb_search_term_wrap tb_group_element_category",d.class="query_category_single",d.help=b.label.query_desc,d.control={control_type:"queryPosts"}):"tax_id"!==n[c]&&"tag_id"!==n[c]||void 0!==d.term_id||(d.control={control_type:"queryPosts"});delete d.description;delete d.after;let f=b.create([d]);!0===a.just_current&&delete d.wrap_class;(function(){let b= "id"===n[c],g="term_id"===n[c]||"tag_id"===n[c],h=g?"":k[d.id],l=f.querySelector(".tb_search_input");l.addEventListener("selectElement",function(c){let d=c.detail.val,f=this.closest(".tb_field");g?(f.getElementsByClassName("query_category_multiple")[0].value=d,x.triggerEvent(this,"queryPosts",{val:d})):null!==f.nextElementSibling?(f=f.nextElementSibling,b||!0!==v||void 0===a.slug_id||(f=f.nextElementSibling),null!==f&&(f=f.getElementsByClassName("tb_search_input")[0],b?void 0!==e.cacheTypes[d]&&(!0=== a.just_current&&"tag"===k[a.tax_id]&&(k[a.tax_id]="post_tag"),u(f,k[a.tax_id],m(e.cacheTypes[d].options)),x.triggerEvent(f,"selectElement",{val:f.getAttribute("data-value")})):(A(f,d),f.addEventListener("keyup",function(a){(48<=a.keyCode&&57>=a.keyCode||65<=a.keyCode&&90>=a.keyCode||8===a.keyCode||229===a.keyCode)&&setTimeout(function(){A(f,d,this.value.trim())}.bind(this),500)},{passive:!0})))):b||x.triggerEvent(this,"queryPosts",{val:this.getAttribute("data-value")})},{passive:!0});if(b){const b= function(){h||(h="post");u(l,h,m(e.cacheTypes));x.triggerEvent(l,"selectElement",{val:h});l=null};null===e.cacheTypes?q(l.parentNode,null,"post_types").done(function(c){e.cacheTypes=c;!0===a.just_current&&void 0==h&&(h=Object.keys(c));b()}):setTimeout(b,10)}else g&&!a.id&&void 0!==a.taxonomy&&(A(l,a.taxonomy),l.addEventListener("input",function(b){(48<=b.keyCode&&57>=b.keyCode||65<=b.keyCode&&90>=b.keyCode||8===b.keyCode||229===b.keyCode)&&setTimeout(function(){A(l,a.taxonomy,this.value.trim())}.bind(this), 500)},{passive:!0}))})();p.appendChild(f)}c.parentNode.replaceChild(p,c);d=c=null})})();return c}},position_box:{w:null,h:null,update(a,b,c){c=z.Lightbox.$lightbox[0].querySelector("#"+a);null===c&&(c=z.Lightbox.$lightbox[0].querySelector('[data-input-id="'+a+'"]'));if(null!==c){var d=c.closest(".tb_position_box_wrapper");a=d.getElementsByClassName("tb_position_box_handle")[0];d=d.getElementsByClassName("tb_position_box_label")[0];const e=this.getPreDefinedPositions();b?void 0!==e[b]&&(b=e[b]):b= "50,50";c.value=b;d.textContent=this.getLabel(b);b=b.split(",");a.style.left=Math.ceil(b[0]*this.w/100)+"px";a.style.top=Math.ceil(b[1]*this.h/100)+"px"}},getLabel(a){switch(a){case "0,0":a="Top Left";break;case "50,0":a="Top Center";break;case "100,0":a="Top Right";break;case "0,50":a="Center Left";break;case "50,50":a="Center Center";break;case "100,50":a="Center Right";break;case "0,100":a="Bottom Left";break;case "50,100":a="Bottom Center";break;case "100,100":a="Bottom Right";break;default:a= a.split(","),a=""===a[0]?"Center Center":"X:"+a[0]+"% Y:"+a[1]+"%"}return a},getPreDefinedPositions(){return{"right-top":"100,0","right-center":"100,50","right-bottom":"100,100","left-top":"0,0","left-center":"0,50","left-bottom":"0,100","center-top":"50,0","center-center":"50,50","center-bottom":"50,100"}},click(a){a.preventDefault();a.stopPropagation();let b,c=a.currentTarget.previousElementSibling;a.target.classList.contains("tb_position_item")?(a=a.target.getAttribute("data-pos").split(","),b= a[0],a=a[1],"50"===b?b=this.w/2:"100"===b&&(b=this.w),"50"===a?a=this.h/2:"100"===a&&(a=this.h)):(b=a.offsetX,a=a.offsetY);c.style.left=b+"px";c.style.top=a+"px";this.changeUpdate(c,b,a)},changeUpdate(a,b,c){b=+(b/this.w*100).toFixed(2);c=+(c/this.h*100).toFixed(2);a=a.closest(".tb_position_box_wrapper").getElementsByClassName("tb_position_box_label")[0];const d=a.nextElementSibling;d.value=b+","+c;a.textContent=this.getLabel(b+","+c);x.triggerEvent(d,"change")},render:function(a,b){const c=this, d=this.getPreDefinedPositions(),e=l.Utils.getMouseEvents(),f=b.getStyleVal(a.id),g=h.createElement("div"),k=h.createElement("div"),m=h.createElement("div"),u=h.createElement("div"),q=h.createElement("div"),n=b.hidden.render(a,b);g.className="tb_position_box_wrapper";k.className="tb_position_box_container";m.className="tb_position_box";u.className="tb_position_box_handle";q.className="tb_position_box_label";for(let a in d){let b=h.createElement("div"),c=h.createElement("span"),e=h.createElement("span"), f=d[a].split(",");c.className="themify_tooltip";e.textContent=a.replace("-"," ");b.className="tb_position_item";b.setAttribute("data-pos",d[a]);b.style.left=f[0]+"%";b.style.top=f[1]+"%";c.appendChild(e);b.appendChild(c);m.appendChild(b)}u.addEventListener(e.mousedown,function(a){if("touchstart"===a.type||1===a.which){a.stopImmediatePropagation();let b,d;const f=this.ownerDocument,g=this,h=this.offsetLeft-(a.touches?a.touches[0].clientX:a.clientX),k=this.offsetTop-(a.touches?a.touches[0].clientY: a.clientY),m=c.w,l=c.h,n=function(a){d=!0;f.body.classList.add("tb_start_animate","tb_move_drag")},u=function(a){a.stopImmediatePropagation();b&&cancelAnimationFrame(b);b=requestAnimationFrame(function(){let b=h+(a.touches?a.touches[0].clientX:a.clientX),d=k+(a.touches?a.touches[0].clientY:a.clientY);b>m?b=m:0>b&&(b=0);d>l?d=l:0>d&&(d=0);g.style.left=b+"px";g.style.top=d+"px";c.changeUpdate(g,b,d)})};f.addEventListener(e.mouseup,function(a){this.removeEventListener(e.mousemove,n,{passive:!0,once:!0}); this.removeEventListener(e.mousemove,u,{passive:!0});d&&(a.stopImmediatePropagation(),b&&cancelAnimationFrame(b),b=d=null,this.body.classList.remove("tb_start_animate","tb_move_drag"))},{passive:!0,once:!0});f.addEventListener(e.mousemove,n,{passive:!0,once:!0});f.addEventListener(e.mousemove,u,{passive:!0})}},{passive:!0});m.addEventListener("click",this.click.bind(this));k.appendChild(u);k.appendChild(m);g.appendChild(k);void 0!==a.after&&g.appendChild(b.after(a));g.appendChild(q);g.appendChild(n); b.afterRun.push(function(){setTimeout(function(){const d=window.getComputedStyle(m);c.w=parseInt(d.getPropertyValue("width"));c.h=parseInt(d.getPropertyValue("height"));c.update(a.id,f,b)},700)});return g}},slider_range:{render:function(a,b){const c=h.createElement("div"),d=h.createElement("div"),e=b.hidden.render(a,b);let f=0,g=100,k="%",m=!0,l=1;void 0!==a.options&&(void 0!==a.options.min&&(f=a.options.min),void 0!==a.options.max&&(g=a.options.max),void 0!==a.options.unit&&(k=a.options.unit),void 0!== a.options.range&&(m=!1),void 0!==a.options["default"]&&(l=a.options["default"]));e.setAttribute("data-min",f);e.setAttribute("data-max",g);e.setAttribute("data-unit",k);c.className="tb_slider_wrapper input-range";d.className="range-slider";void 0!==a.wrap_class&&(c.className=" "+a.wrap_class);c.appendChild(d);c.appendChild(e);const q=function(a){const b=h.createElement("span"),c=h.createElement("span");var d=parseFloat(e.getAttribute("data-min"));const f=parseFloat(e.getAttribute("data-max")),g=e.getAttribute("data-unit"); let k=e.value;k=m?k?k.split(","):[d,f]:k?k:l;b.className="tb_slider_label_l";c.className="tb_slider_label_u";d={range:m,min:d,max:f,slide:function(a,d){m?(b.textContent=d.values[0]+g,c.textContent=d.values[1]+g):b.textContent=d.value+g},create(a,d){a=this.getElementsByClassName("ui-slider-handle");m?(b.textContent=k[0]+g,a[0].appendChild(b),c.textContent=k[1]+g,a[1].appendChild(c)):(b.textContent=k+g,a[0].appendChild(b));k=null},change:function(a,b){e.value=m?b.values[0]+","+b.values[1]:b.value}}; m?d.values=k:d.value=k;w.jQuery.fn.slider.call(p(a),d)};b.afterRun.push(function(){w.Themify.LoadAsync(themifyBuilder.includes_url+"js/jquery/ui/slider.min.js",function(){q(d)},themify_vars.version,null,function(){return void 0!==w.jQuery.fn.slider})});return c}},range:{update(a,b,c){const d=z.Lightbox.$lightbox[0].querySelector("#"+a);null!==d&&(d.value=void 0!==b?b:"",b=a+"_unit",a=w.document.getElementById(b),null!==a&&"SELECT"===a.tagName&&(c=c.getStyleVal(b),void 0===c&&(c=a[0].value),a.value= c,this.setData(d,-1!==a.selectedIndex?a[a.selectedIndex]:a[0])))},setData(a,b){const c=b.getAttribute("data-min"),d=b.getAttribute("data-max");b=b.getAttribute("data-increment");let e=parseFloat(a.value.trim());if(e>parseFloat(d)||e<parseFloat(c))e=e>parseFloat(d)?d:c,a.value=0!==b%1?parseFloat(e).toFixed(1):parseInt(e);a.setAttribute("min",c);a.setAttribute("max",d);a.setAttribute("step",b)},controlChange(a,b,c){const d=void 0!==b&&"SELECT"===b.tagName,e=this,f=l.Utils.getMouseEvents();a.addEventListener(f.mousedown, function(a){if("touchstart"===a.type||1===a.which){a.stopImmediatePropagation();let b=a.touches?a.touches[0].clientY:a.clientY,d;a=this.ownerDocument;const e=this,g=this.value,h=parseFloat(this.getAttribute("max")),t=parseFloat(this.getAttribute("min")),r=this.getAttribute("step")||1,y=0!==r%1,v=y?parseFloat(r):parseInt(r),w=function(a){var b=e.value||0;b=y?parseFloat(b):parseInt(b);e.value=+("increase"===a?b>=h?h:b+v:b<=t?t:b-v).toFixed(2)},z=function(a){a.stopImmediatePropagation();d&&cancelAnimationFrame(d); d=requestAnimationFrame(function(){const d=a.touches?a.touches[0].clientY:a.clientY;d<b?w("increase"):d>b&&w("decrease");b=d;x.triggerEvent(e,c)})};a.addEventListener(f.mouseup,function(a){a.stopImmediatePropagation();this.removeEventListener(f.mousemove,z,{passive:!0});d&&cancelAnimationFrame(d);d=b=null;e.value!==g&&x.triggerEvent(e,c);l.hasChanged=!0;this.body.style.cursor="";this.body.classList.remove("tb_start_animate","tb_move_drag")},{once:!0,passive:!0});a.body.style.cursor=p(this).css("cursor"); a.body.classList.add("tb_start_animate","tb_move_drag");a.addEventListener(f.mousemove,z,{passive:!0})}},{passive:!0});!0===d&&b.addEventListener("change",function(d){e.setData(a,b.options[b.selectedIndex]);x.triggerEvent(a,c)},{passive:!0});void 0!==b&&e.setData(a,d?-1!==b.selectedIndex?b[b.selectedIndex]:b[0]:b)},render(a,b){const c=h.createElement("div");var d=h.createElement("span");const e=h.createElement("input");var f=parseFloat(b.getStyleVal(a.id));c.className="tb_tooltip_container";void 0!== a.wrap_class&&(c.className=" "+a.wrap_class);d.className="tb_range_input";e.autocomplete="off";e.type="number";e.className="tb_range";void 0!==f&&(e.value=f);!0===b.is_repeat?(e.className+=!0===b.is_sort?" tb_lb_sort_child":" tb_lb_option_child",e.dataset.inputId=a.id):(e.className+=" tb_lb_option",e.id=a.id);void 0!==a.class&&(e.className+=" "+a.class);d.appendChild(e);void 0!==a.tooltip&&d.appendChild(b.tooltip(a.tooltip));c.appendChild(d);if(void 0===a.units)e.min=0,e.max=1500,e.step=1;else{d= h.createElement("div");var g=Object.keys(a.units);d.className="selectwrapper noborder";if(1<g.length){f=b.getStyleVal(a.id+"_unit");const c=a.id+"_unit";g=h.createElement("select");g.className="tb_unit";!0===b.is_repeat?(g.className+=!0===b.is_sort?" tb_lb_sort_child":" tb_lb_option_child",g.dataset.inputId=c):(g.className+=" tb_lb_option",g.id=c);void 0!==a.select_class&&(g.className+=" "+a.select_class);for(var k in a.units){let b=h.createElement("option");a.units[k]||(a.units[k]={});a.units[k].min|| (a.units[k].min=0);a.units[k].max||(a.units[k].max=100);e.setAttribute("min",parseInt(a.units[k].min));e.setAttribute("max",parseInt(a.units[k].max));b.value=k;b.textContent=k;b.dataset.min=a.units[k].min;b.dataset.max=a.units[k].max;b.dataset.increment=void 0!==a.units[k].increment?a.units[k].increment:"em"===k||"em"===k?.1:1;f===k&&(b.selected=!0);g.appendChild(b)}b.initControl(g,{type:"select",id:c,control:a.control})}else k=g[0],a.units[k]||(a.units[k]={}),a.units[k].min||(a.units[k].min=0),a.units[k].max|| (a.units[k].max=100),e.setAttribute("min",parseFloat(a.units[k].min)),e.setAttribute("max",parseFloat(a.units[k].max)),e.setAttribute("step",void 0!==a.units[k].increment?parseFloat(a.units[k].increment):"1"),f<parseFloat(a.units[k].min)?e.value=a.units[k].min:f>parseFloat(a.units[k].max)&&(e.value=a.units[k].max),g=h.createElement("span"),g.className="tb_unit",g.id=a.id+"_unit",g.dataset.min=a.units[k].min,g.dataset.max=a.units[k].max,g.dataset.increment=void 0!==a.units[k].increment?a.units[k].increment: "em"===k||"em"===k?.1:1,g.textContent=k;d.appendChild(g);c.appendChild(d)}void 0!==a.after&&c.appendChild(b.after(a.after));void 0!==a.description&&c.appendChild(b.description(a.description));d="styling"===b.clicked?"keyup":"change";!0===a.opposite&&g.addEventListener("change",function(a){a.stopPropagation();b.margin.changeUnit(this)},{passive:!0});this.controlChange(e,g,d);g=p.extend({},a);!0===a.opposite&&e.addEventListener(d,function(a){a.stopPropagation();b.margin.changeOppositive(this)},{passive:!0}); g.type="range";b.initControl(e,g);return c}},icon:{render(a,b){const c=h.createElement("div"),d=h.createElement("input"),e=h.createElement("span"),f=h.createElement("span"),g=b.getStyleVal(a.id);d.type="text";d.className="themify_field_icon";e.className="tf_plus_icon themify_fa_toggle";c.className="tb_icon_wrap";f.className="tb_clear_input tf_close";!0===b.is_repeat?(d.className+=!0===b.is_sort?" tb_lb_sort_child":" tb_lb_option_child",d.dataset.inputId=a.id):(d.className+=" tb_lb_option",d.id=a.id); void 0!==a.class&&(d.className+=" "+a.class);void 0!==g?(d.value=g,e.appendChild(l.Utils.getIcon(g)),b.afterRun.push(function(){setTimeout(function(){w.Themify.fontAwesome(g)},100)})):e.className+=" default_icon";c.appendChild(b.initControl(d,a));c.appendChild(e);c.appendChild(f);return c}},createMarginPadding(a,b){const c=void 0!==b.options?b.options:[{id:"top",label:this.label.top},{id:"bottom",label:this.label.bottom},{id:"left",label:this.label.left},{id:"right",label:this.label.right}],d=h.createElement("ul"), e=this,f=b.id,g="border_radius"===a,k=p.extend(!0,{},b);k.units=void 0!==b.units?b.units:{px:{min:"margin"===a?-1500:0,max:1500},em:{min:"margin"===a?-10:0,max:10},"%":{min:"margin"===a?-100:0}};k.prop=null;k.opposite=!0;d.className="tb_seperate_items tf_inline_b tb_has_opposite";!0===g&&d.setAttribute("data-toptext",c[0].label);a=c.length;let m=h.createDocumentFragment(),u=!1;for(let d=0;d<a;++d){var q=h.createElement("li");let a=f+"_"+c[d].id;k.id=a;k.tooltip=c[d].label;k.class=void 0===b["class"]? "":b["class"];k.class+=" tb_multi_field tb_range_"+c[d].id;!0===g&&(k.class+=" tb_is_border_radius");let l=this.range.render(k,this);if(0!==d&&3!==d){let a=h.createElement("li");var n="right"===c[d].id?"top":c[d].id;a.className="tb_seperate_opposite tb_opposite_"+("bottom"===n?"top":n);a.appendChild(this.checkboxGenerate("checkbox",{id:f+"_opp_"+n,"class":"style_apply_oppositive",options:[{name:"1",value:""}],new_line:!1}));n=a.querySelector(".style_apply_oppositive");let b=h.createElement("div"); b.className="tb_oppositive_state";n.parentNode.insertBefore(b,n.nextSibling);n.addEventListener("change",function(a){a.stopPropagation();e.margin.bindingOppositive(this,!0)},{passive:!0});!0===n.checked&&e.afterRun.push(function(){e.margin.bindingOppositive(this)}.bind(n));m.appendChild(a)}q.appendChild(l);m.appendChild(q);!0===g?(q="border-","top"===c[d].id?q+="top-left-radius":"right"===c[d].id?q+="top-right-radius":"left"===c[d].id?q+="bottom-left-radius":"bottom"===c[d].id&&(q+="bottom-right-radius")): "transform"===b.type?q=b.prop:(q=b.prop+"-"+c[d].id,!0===this.is_new&&!u&&this.values[a]&&(u=!0));this.styles[a]={prop:q,selector:b.selector}}d.appendChild(m);m=h.createDocumentFragment();m.appendChild(d);if(4===a){m.appendChild(e.checkboxGenerate("icon_checkbox",{id:"checkbox_"+f+"_apply_all","class":"style_apply_all",options:[{name:"1",value:e.label.all,icon:'<span class="apply_all_checkbox_icon">'+l.Utils.getIcon("ti-link").outerHTML+"</span>"}],"default":"module"===this.component&&!0===this.is_new&& !u||0===Object.keys(this.values).length?"1":!1,new_line:!1}));const a=m.querySelector(".style_apply_all");a.addEventListener("change",function(a){e.margin.apply_all(this,!0)},{passive:!0});!0===a.checked&&e.afterRun.push(function(){e.margin.apply_all(a)})}return m},margin_opposity:{update(a,b,c){c.range.update(a,b,c);c.checkbox.update(a+"_opp_top",c.getStyleVal(a+"_opp_top"),c);c.range.update(c.stylesData[a].bottomId,c.getStyleVal(c.stylesData[a].bottomId),c)},render(a,b){const c=["topId","bottomId"], d=h.createElement("ul"),e=p.extend(!0,{},a);d.className="tb_seperate_items tf_inline_b tb_has_opposite";for(let g=0;2>g;++g){var f=h.createElement("li");e.id=a[c[g]];e.prop="topId"===c[g]?"margin-top":"margin-bottom";e.class="tb_multi_field tb_range_"+("topId"===c[g]?"top":"bottom");e.opposite=!0;e.tooltip="topId"===c[g]?b.label.top:b.label.bottom;f.appendChild(b.range.render(e,b));d.appendChild(f);if(0===g){f=h.createElement("li");f.className="tb_seperate_opposite tb_opposite_top";f.appendChild(b.checkboxGenerate("checkbox", {id:e.id+"_opp_top","class":"style_apply_oppositive",options:[{name:"1",value:""}],new_line:!1}));let a=f.querySelector(".style_apply_oppositive"),c=h.createElement("div");c.className="tb_oppositive_state";a.parentNode.insertBefore(c,a.nextSibling);a.addEventListener("change",function(a){a.stopPropagation();b.margin.bindingOppositive(this,!0)},{passive:!0});d.appendChild(f)}b.stylesData[a[c[g]]]=b.styles[a[c[g]]]={id:a[c[g]],prop:"topId"===c[g]?"margin-top":"margin-bottom",selector:a.selector}}return d}}, margin:{bindingOppositive(a,b){var c=a.closest(".tb_seperate_opposite"),d=c.parentNode;c=!0===c.classList.contains("tb_opposite_left")?c.nextElementSibling:c.previousElementSibling;var e=!0===a.checked;a=this.getOppositiveDir(c.getElementsByClassName("tb_range")[0]);d=d.getElementsByClassName("tb_range_"+a)[0];a=d.closest("li").getElementsByClassName("tb_unit")[0];if(!0===e){if(d.setAttribute("data-v",d.value),a.setAttribute("data-u",a.value),!0===b){e=c.getElementsByClassName("tb_range")[0];const b= e.value,g=d.value;""!==b||""===g?(d.value=b,a.value=c.getElementsByClassName("tb_unit")[0].value):(e.value=g,c.getElementsByClassName("tb_unit")[0].value=a.value)}}else c=d.getAttribute("data-v"),d.value=void 0===c||null===c?"":c,a.value=a.getAttribute("data-u");!0===b&&x.triggerEvent(d,"keyup")},changeUnit(a){const b=a.closest(".tb_has_opposite");if(!b.hasAttribute("data-checked")){var c=w.document.getElementById(a.getAttribute("id").replace(/_unit$/ig,""));const d=this.getOppositiveDir(c);c=c.classList.contains("tb_is_border_radius"); !0===b.getElementsByClassName("tb_opposite_"+("top"===d||!0===c&&"right"===d||!1===c&&"bottom"===d?"top":"left"))[0].getElementsByClassName("style_apply_oppositive")[0].checked&&(b.getElementsByClassName("tb_range_"+d)[0].closest("li").getElementsByClassName("tb_unit")[0].value=a.value)}},getOppositiveDir(a){a=a.classList;let b=a.contains("tb_range_top")?"bottom":a.contains("tb_range_bottom")?"top":a.contains("tb_range_left")?"right":"left";a.contains("tb_is_border_radius")&&(b="bottom"===b?"right": "top"===b?"left":"left"===b?"top":"bottom");return b},changeOppositive(a){const b=a.closest("li").parentNode;if(!b.hasAttribute("data-checked")){const c=this.getOppositiveDir(a),d=a.classList.contains("tb_is_border_radius");!0===("top"===c||!0===d&&"right"===c||!1===d&&"bottom"===c?b.getElementsByClassName("tb_opposite_top")[0]:b.getElementsByClassName("tb_opposite_left")[0]).getElementsByClassName("style_apply_oppositive")[0].checked&&(b.getElementsByClassName("tb_range_"+c)[0].value=a.value)}}, apply_all(a,b){const c=a.closest(".tb_input").getElementsByClassName("tb_seperate_items")[0],d=c.getElementsByTagName("li")[0];!0===a.checked===!0?(c.setAttribute("data-checked",1),a=ThemifyConstructor.label.all):(c.removeAttribute("data-checked"),a=c.getAttribute("data-toptext"),a||(a=ThemifyConstructor.label.top));!0===b&&x.triggerEvent(d.getElementsByClassName("tb_multi_field")[0],"keyup");d.getElementsByClassName("tb_tooltip_up")[0].textContent=a},update(a,b,c){b=["top","right","bottom","left"]; const d="checkbox_"+a+"_apply_all",e=w.document.getElementById(d).getElementsByClassName("style_apply_all")[0];for(let d=3;-1<d;--d){var f=a+"_"+b[d];if(null!==w.document.getElementById(f)&&(c.range.update(f,c.getStyleVal(f),c),!0!==e.checked)){f=a+"_opp_"+b[d];let e=w.document.getElementById(f);null!==e&&(e.getElementsByClassName("style_apply_oppositive")[0].checked=c.getStyleVal(f)?!0:!1)}}c.checkbox.update(d,c.getStyleVal(d),c);this.apply_all(e)},render(a,b){return b.createMarginPadding(a.type, a)}},padding:{render(a,b){return b.createMarginPadding(a.type,a)}},box_shadow:{update(a,b,c){b=["hOffset","vOffset","blur","spread"];const d=a+"_color",e=a+"_inset";for(let d=3;-1<d;--d){let e=a+"_"+b[d];null!==w.document.getElementById(e)&&c.range.update(e,c.getStyleVal(e),c)}c.color.update(d,c.getStyleVal(d),c);c.checkbox.update(e,c.getStyleVal(e),c)},render(a,b){var c={hOffset:{label:b.label.h_o,units:{px:{min:-200,max:200},em:{max:10}}},vOffset:{label:b.label.v_o,units:{px:{min:-200,max:200}, em:{max:10}}},blur:{label:b.label.bl,units:{px:{max:300},em:{max:10}}},spread:{label:b.label.spr,units:{px:{min:-200,max:200},em:{max:10}}}};const d=h.createElement("ul");var e=a.id;const f=p.extend(!0,{},a);f["class"]="tb_shadow_field";f.prop=null;d.className="tb_seperate_items tf_inline_b tb_shadow_inputs";for(var g in c)if(void 0!==c[g]){var k=c[g];let m=h.createElement("li"),l=e+"_"+g;f.id=l;f.tooltip=k.label;f.units=k.units;f.selector=a.selector;m.appendChild(b.range.render(f,b));d.appendChild(m); b.styles[l]={prop:a.prop,selector:a.selector}}c=e+"_color";g=h.createElement("li");k={id:c,type:"color",class:f["class"],selector:a.selector};g.className="tb_shadow_color";b.styles[c]={prop:a.prop,selector:a.selector,type:"color"};g.appendChild(b.color.render(k,b));d.appendChild(g);c=e+"_inset";g=h.createElement("li");e=b.checkboxGenerate("checkbox",{id:c,origID:e,type:"checkbox",class:f["class"],isBoxShadow:!0,prop:a.prop,options:[{value:b.label.in_sh,name:"inset"}]});b.styles[c]={prop:a.prop,selector:a.selector}; g.className="tb_box_shadow_inset";g.appendChild(e);d.appendChild(g);return d}},text_shadow:{update(a,b,c){b=[c.label.h_sh,c.label.v_sh,c.label.bl];const d=a+"_color";for(let d=2;-1<d;--d){let e=a+"_"+b[d];null!==w.document.getElementById(e)&&c.range.update(e,c.getStyleVal(e),c)}c.color.update(d,c.getStyleVal(d),c)},render(a,b){var c={hShadow:{label:b.label.h_sh,units:{px:{min:-200,max:200},em:{max:10}}},vShadow:{label:b.label.v_sh,units:{px:{min:-200,max:200},em:{max:10}}},blur:{label:b.label.bl, units:{px:{max:300},em:{max:10}}}};const d=h.createElement("ul");var e=a.id,f=p.extend(!0,{},a);f["class"]="tb_shadow_field";f.prop=null;d.className="tb_seperate_items tf_inline_b tb_shadow_inputs";for(let g in c){if(!c.hasOwnProperty(g))continue;let k=c[g],m=h.createElement("li"),l=e+"_"+g;f.id=l;f.tooltip=k.label;f.units=k.units;m.appendChild(b.range.render(f,b));d.appendChild(m);b.styles[l]={prop:a.prop,selector:a.selector}}c=h.createElement("li");e+="_color";f={id:e,type:"color",class:f["class"], selector:a.selector};c.className="tb_shadow_color";b.styles[e]={prop:a.prop,selector:a.selector,type:"color"};c.appendChild(b.color.render(f,b));d.appendChild(c);return d}},border_radius:{render(a,b){a.options=b.getOptions(a);return b.createMarginPadding(a.type,a)}},border:{changeControl(a){const b=a.parentNode;a=a.value;const c=b.parentNode.children;for(let d=c.length-1;-1<d;--d)c[d]!==b&&c[d].classList.toggle("_tb_hide_binding","none"===a)},apply_all(a,b){const c=b.getElementsByTagName("input"), d=function(b,d){for(let a=c.length-1;-1<a;--a)c[a].parentNode.classList.toggle("_tb_disable",b);!0===b?a.dataset.checked=1:a.removeAttribute("data-checked");!0===d&&x.triggerEvent(a.children[0].getElementsByTagName("select")[0],"change")};for(b=c.length-1;-1<b;--b)c[b].addEventListener("change",function(){d("all"===this.value,!0)},{passive:!0}),!0===c[b].checked&&"all"===c[b].value&&d(!0,null)},update(a,b,c){b=["top","right","bottom","left"];const d=a+"-type";for(let d=0;4>d;++d){var e=a+"_"+b[d]; let f=e+"_color",h=e+"_style";e+="_width";c.color.update(f,c.getStyleVal(f),c);c.select.update(h,c.getStyleVal(h),c);this.changeControl(w.document.getElementById(h));c.range.update(e,c.getStyleVal(e),c)}c.radio.update(d,c.getStyleVal(d),c)},render(a,b){const c=["top","right","bottom","left"],d=h.createElement("ul"),e=a.id,f=p.extend(!0,{},a),g=this,k=p.extend(!0,{},a);k.options=[{value:"all",name:b.label.all,"class":"style_apply_all",icon:'<i class="tic-border-all"></i>',label_class:"tb_radio_label_borders"}]; k.option_js=!0;k.id=e+"-type";k.no_toggle=!0;k["default"]="top";k.prop=null;f.options=b.static.border;f.prop=null;d.className="tb_seperate_items tb_borders tb_group_element_border";for(let l=0;4>l;++l){let q=h.createElement("li");var m=e+"_"+c[l];k.options.push({value:c[l],name:b.label[c[l]],icon:'<i class="tic-border-'+c[l]+'"></i>',label_class:"tb_radio_label_borders"});q.className="tb_group_element_"+c[l];"top"===c[l]&&(q.className+=" tb_group_element_all");b.styles[m+"_color"]={prop:"border-"+ c[l],selector:a.selector};f.id=m+"_color";f.type="color";f.class="border_color";q.appendChild(b.color.render(f,b));b.styles[m+"_width"]={prop:"border-"+c[l],selector:a.selector};f.id=m+"_width";f.type="range";f.class="border_width";f.wrap_class="range_wrapper";f.units={px:{max:300}};q.appendChild(b.range.render(f,b));b.styles[m+"_style"]={prop:"border-"+c[l],selector:a.selector};f.id=m+"_style";f.type="select";f.class="border_style tb_multi_field";m=b.select.render(f,b);let n=m.querySelector("select"); q.appendChild(m);d.appendChild(q);n.addEventListener("change",function(a){g.changeControl(this)},{passive:!0});"none"===n.value&&g.changeControl(n)}a=h.createDocumentFragment();a.appendChild(b.radioGenerate("icon_radio",k,b));g.apply_all(d,a.querySelector("#"+k.id));a.appendChild(d);return a}},slider:{render(a,b){["crossfade","cover-fade","uncover-fade"].includes(b.values.effect_slider)&&(b.values.effect_slider="fade");return b.create(b.getOptions(a))}},custom_css:{render(a,b){a.class="large";a.control= !1;a.help=b.label.custom_css_help;b=b.text.render(a,b);l.Utils.changeOptions(b.querySelector("#"+a.id),a.type);return b}},custom_css_id:{render(a,b){b=b.create([{id:"custom_css_id",type:"text",label:b.label.id_name,help:b.label.id_help,control:!1,"class":"large"}],b);l.Utils.changeOptions(b.querySelector("#custom_css_id"),a.type);return b}},hidden:{render(a,b){const c=h.createElement("input"),d=b.getStyleVal(a.id);c.type="hidden";!0===b.is_repeat?(c.className=!0===b.is_sort?"tb_lb_sort_child":"tb_lb_option_child", c.dataset.inputId=a.id):(c.className="tb_lb_option",c.id=a.id);void 0!==a.class&&(c.className+=" "+a.class);void 0!==d?c.value=d:void 0!==a.value&&(c.value=a.value);return b.initControl(c,a)}},frame:{render(a,b){a.options=b.static.frame;a.class="tb_frame tf_scrollbar";a.binding={not_empty:{show:["tb_frame_multi_wrap","tb_frame_color"]},empty:{hide:["tb_frame_multi_wrap","tb_frame_color"]}};return b.layout.render(a,b)}},title:{render(a,b){a.class="large";a.control={event:"keyup",control_type:"change", selector:".module-title"};return b.text.render(a,b)}},url:{render(a,b){a.input_type="url";return b.text.render(a,b)}},advacned_link:{render(a,b){return b.create([{id:"link",type:"radio",label:"l",wrap_class:" tb_compact_radios",link_to:!0,binding:{permalink:{show:"open_link",hide:"custom_link"},custom:{show:"custom_link",hide:"open_link"},none:{hide:["custom_link","open_link","no_follow"]}}},{id:"custom_link",type:"url",label:"cl"},{id:"open_link",type:"radio",label:"o_l",link_type:!0,control:!1, wrap_class:" tb_compact_radios",binding:{lightbox:{show:"tb_t_m_lightbox"},regular:{hide:"tb_t_m_lightbox"},newtab:{hide:"tb_t_m_lightbox"}}},{type:"multi",wrap_class:"tb_t_m_lightbox",label:"lg",options:[{id:"lightbox_w",type:"range",label:"w",control:!1,units:{px:{max:1E3},"%":""}},{id:"lightbox_h",type:"range",label:"ht",control:!1,units:{px:{max:1E3},"%":""}}]}])}},button:{render(a,b){const c=h.createElement("button");c.className="builder_button";c.id=a.id;void 0!==a.class&&(c.className+=" "+ a.class);c.textContent=a.name;return b.initControl(c,a)}},row_anchor:{render(a,b){a.control=!1;b=b.text.render(a,b);l.Utils.changeOptions(b.querySelector("#"+a.id),a.type);return b}},widget_form:{render(a,b){b=h.createElement("div");b.id=a.id;b.className="module-widget-form-container wp-core-ui tb_lb_option";return b}},widget_select:{data:null,el:null,cache:[],mediaInit:null,textInit:null,render(a,b){const c=h.createDocumentFragment(),d=h.createElement("div"),e=h.createElement("i"),f=h.createElement("input"), g=h.createElement("div"),k=h.createElement("div");d.id="available-widgets-filter";d.className="selectwrapper";e.className="tb_loading_widgets tf_loader";f.type="text";f.id="widgets-search";f.dataset.validation="not_empty";f.dataset.errorMsg=b.label.widget_validate;f.autocomplete="off";f.placeholder=b.label.search_widget;g.id="available-widgets";g.className="tf_scrollbar";g.tabIndex=1;k.id=a.id;k.className="tb_lb_option tb_widget_select";this.el=k;d.appendChild(e);d.appendChild(f);g.appendChild(k); c.appendChild(d);c.appendChild(g);const m=this,u=b.values[a.id],q=function(){const c=[],d=function(b,d){for(var e=c.length-1;-1<e;--e)c[e].classList.remove("selected");b.classList.add("selected");e=b.dataset.value;f.value=b.getElementsByClassName("widget-title")[0].textContent;g.style.display="none";m.select(e,m.data[e].b,d,a)};for(let e in m.data){let f=h.createElement("div");var q=h.createElement("div");let g=h.createElement("h3");f.className="widget-tpl "+m.data[e].b;f.dataset.value=e;q.className= "widget-title";g.textContent=m.data[e].n;q.appendChild(g);f.appendChild(q);f.addEventListener("click",function(c){c.preventDefault();c.stopPropagation();b.settings[a.id]=this.dataset.value;d(this,null)});c.push(f);void 0!==m.data[e].d&&(q=h.createElement("div"),q.className="widget-description",q.innerHTML=m.data[e].d,f.appendChild(q));k.appendChild(f);u===e&&d(f,b.values.instance_widget)}m.search(f,g);e.parentNode.removeChild(e);l.hasChanged=!0};if(null===m.data){p.ajax({type:"POST",url:themifyBuilder.ajaxurl, dataType:"json",data:{action:"tb_get_widget_items",nonce:themifyBuilder.tb_load_nonce},success(a){m.data=a;q()}});for(let a in themifyBuilder.widget_css)w.Themify.LoadCss(themifyBuilder.widget_css[a],themify_vars.version);themifyBuilder.widget_css=null}else setTimeout(q,5);return c},search(a,b){const c=this;a.addEventListener("focus",this.show.bind(this),{passive:!0});a.addEventListener("blur",function(a){a.relatedTarget&&"available-widgets"===a.relatedTarget.id||(b.style.display="none")},{passive:!0}); a.addEventListener("keyup",function(a){c.show();a=this.value.trim();const b=new RegExp(a,"i"),d=c.el.getElementsByClassName("widget-tpl");for(let c=0,e=d.length;c<e;++c)if(""===a)d[c].style.display="block";else{let a=d[c].getElementsByTagName("h3")[0];a=a.textContent||a.innerText;b.test(a)?d[c].style.display="block":d[c].style.display="none"}},{passive:!0})},show(){this.el.closest("#available-widgets").style.display="block"},hide(){this.el.closest("#available-widgets").style.display="none"},select(a, b,c,d){const e=this,f=p("#instance_widget",z.Lightbox.$lightbox),g=function(g){const k=function(){const k=p(g.form);f.addClass("open").html(k.html());if(c)for(let a in c)k.find('[name="'+a+'"]').val(c[a]);"text"===b?wp.textWidgets&&(e.textInit||(e.textInit=!0,wp.textWidgets.init()),c&&delete wp.textWidgets.widgetControls[c["widget-id"]]):wp.mediaWidgets&&(e.mediaInit||(wp.mediaWidgets.init(),e.mediaInit=!0),c&&delete wp.mediaWidgets.widgetControls[c["widget-id"]]);p(h).trigger("widget-added",[f]); "text"===b&&ThemifyConstructor.initControl(f.find(".wp-editor-area")[0],{control:{control_type:"wp_editor",type:"refresh"}});if("visual"===l.mode){const b=p.extend(!0,{},d);b.id=f[0].id;f.on("change",":input",function(){!1===l.is_ajax_call&&ThemifyConstructor.control.widget_select(f,b)});a&&ThemifyConstructor.control.widget_select(f,b)}f.removeClass("tb_loading_widgets_form").find("select").wrap('<span class="selectwrapper"/>')},u=function(a,b){const c=a.length;(function(a,b){x.LoadAsync(a,b,g.v)})(a[b].src, function(){if(a[b].extra&&a[b].extra.after){{var d=a[b].extra.after;let c="";if("object"===typeof d)for(var e in d)d[e]&&(c+=d[e]);""!==c&&(d=h.createElement("script"),e=h.getElementsByTagName("script")[0],d.type="text/javascript",d.text=c,e.parentNode.insertBefore(d,e))}}++b;b<c?u(a,b):k()})};void 0===e.cache[b]?(g.template&&h.body.insertAdjacentHTML("beforeend",g.template),0<g.src.length?u(g.src,0):k()):k()};f.addClass("tb_loading_widgets_form").html('<div class="tf_loader"></div>');c&&p.each(c, function(a,b){const d=a.match(/.*\[\d\]\[(.*)\]/);p.isArray(d)&&"undefined"!==d[1]&&(delete c[a],c[d[1]]=b)});p.ajax({type:"POST",dataType:"json",url:themifyBuilder.ajaxurl,data:{action:"module_widget_get_form",tb_load_nonce:themifyBuilder.tb_load_nonce,load_class:a,tpl_loaded:1===e.cache[b]?1:0,id_base:b,widget_instance:c},success(a){a&&a.form&&(g(a),e.cache[b]=1)}})}},message:{render(a,b){b=h.createElement("div");void 0!==a.class&&(b.className+=a.class);b.innerHTML=a.comment;return b}},filters:{render(a, b){const c={hue:{label:b.label.hue,units:{deg:{max:360}},prop:"hue-rotate"},saturation:{label:b.label.sat,units:{"%":{max:200}},prop:"saturate"},brightness:{label:b.label.bri,units:{"%":{max:200}},prop:"brightness"},contrast:{label:b.label.con,units:{"%":{max:200}},prop:"contrast"},invert:{label:b.label.inv,units:{"%":""},prop:"invert"},sepia:{label:b.label.se,units:{"%":""},prop:"sepia"},opacity:{label:b.label.op,units:{"%":""},prop:"opacity"},blur:{label:b.label.bl,units:{px:{max:50}},prop:"blur"}}, d=h.createElement("ul"),e=a.id,f=p.extend(!0,{},a);f["class"]="tb_filters_field";f.prop=null;d.className="tb_seperate_items tb_filters_fields";for(let g in c)if(void 0!==c[g]){let k=c[g],l=h.createElement("li"),p=h.createElement("div"),q=h.createElement("span"),n=e+"_"+g;f.id=n;f.units=k.units;f.selector=a.selector;p.className="tb_label";q.className="tb_label_text";q.textContent=k.label;p.appendChild(q);l.appendChild(p);l.appendChild(b.range.render(f,b));d.appendChild(l);b.styles[n]={prop:k.prop, selector:a.selector}}return d}},help(a){const b=h.createElement("div"),c=h.createElement("div"),d=h.createElement("i");b.className="tb_help";c.className="tb_help_content";d.tabIndex=-1;d.className="icon";c.innerHTML=a;d.appendChild(tb_app.Utils.getIcon("ti-help"));b.appendChild(d);b.appendChild(c);return b},tooltip(a){const b=h.createElement("span");b.className="tb_tooltip_up";b.textContent=a;return b},description(a){const b=h.createElement("small");b.innerHTML=a;return b},after(a){const b=h.createElement("span"); b.className="tb_input_after";b.textContent=a.after;void 0!==a.label&&""!==a.label||void 0===a.help||""===a.help||b.appendChild(this.help(a.help));return b},height:{update(a,b,c){c.checkbox.update(a,c.getStyleVal(a),c)},render(a,b){a.isHeight=!0;const c=h.createDocumentFragment(),d=p.extend(!0,{},a);d.label="ht";d.type="range";d.id=a.id;d.prop="height";d.wrap_class="tb_group_element_"+a.id+"_height tf_inline_b";d.units={px:{max:1200},vh:"","%":"",em:{max:200}};b.range.render(d,b);b.styles[a.id]={prop:"height", selector:a.selector};b.styles[a.id+"_auto_height"]={prop:"height",selector:a.selector};c.appendChild(b.range.render(d,b));c.appendChild(b.checkboxGenerate("checkbox",{id:a.id+"_auto_height",heightID:a.id,type:"checkbox",isHeight:!0,prop:"height",binding:{checked:{hide:"tb_group_element_ht_height"},not_checked:{show:"tb_group_element_ht_height"}},options:[{value:b.label.a_ht,name:"auto"}]}));return c}},toggle_switch:{update(a,b,c){c.checkbox.update(a,c.getStyleVal(a),c)},controlChange(a,b){a.addEventListener("change", function(){this.value=!0===this.checked?b.on.name:void 0!==b.off?b.off.name:"";"visibility"===ThemifyConstructor.clicked&&null!==l.activeModel&&l.Utils.visibilityLabel(x.body[0].querySelector("[data-cid="+l.activeModel.cid+"]"),l.Forms.serialize("tb_options_visibility"))},{passive:!0})},render(a,b){var c=p.extend(!0,{},a);const d={},e=h.createElement("div");let f="off",g=b.getStyleVal(a.id);c.control=!1;c["class"]=void 0===c["class"]?"toggle_switch":c["class"]+" toggle_switch";var k=c.options;if(void 0=== k||"simple"===k)"simple"===k?k={on:{name:"yes",value:b.label.y},off:{name:"no",value:b.label.no}}:(k={on:{name:"no",value:b.label.s},off:{name:"yes",value:b.label.hi}},void 0===c["default"]&&(c["default"]="on"));void 0===g?("on"===c["default"]&&(f="on"),g="on"===f?k.on.name:void 0!==k.off?k.off.name:""):(!1===g&&(g=""),f=k.on.name===g?"on":"off");for(var l in k)void 0===c.after&&void 0!==k[l].value&&e.setAttribute("data-"+l,void 0!==b.label[k[l].value]?b.label[k[l].value]:k[l].value),d[l]=k[l];l= Object.keys(k)[0];delete c.binding;delete k[l].value;delete c["default"];c.options=[k[l]];void 0===c.wrap_checkbox&&(c.wrap_checkbox="");c.wrap_checkbox+=" tb_switcher";e.className="switch_label";c=b.checkboxGenerate("checkbox",c);k=c.querySelector(".toggle_switch");k.value=g;k.checked="on"===f;this.controlChange(k,d);k.parentNode.appendChild(e);b.initControl(k,a);return c}},width:{update(a,b,c){c.checkbox.update(a,c.getStyleVal(a),c)},render(a,b){a.isWidth=!0;var c={id:a.id+"_auto_width",widthID:a.id, type:"checkbox",isWidth:!0,prop:"width",options:[{value:b.label.a_wd,name:"auto"}]};b.styles[a.id+"_auto_width"]={prop:"width",selector:a.selector};c=b.checkboxGenerate("checkbox",c);const d=c.querySelector(".tb_lb_option"),e=c.querySelector("input"),f=p.extend(!0,{},a);e.addEventListener("change",function(b){const c=w.document.getElementsByClassName("tb_group_element_"+a.id+"_width")[0];c&&c.classList.toggle("hide-auto-height",b.target.checked)},{passive:!0});f.label="w";f.type="range";f.id=a.id; f.prop="width";f.wrap_class="tb_group_element_"+a.id+"_width";"auto"===b.values[a.id+"_auto_width"]&&(f.wrap_class+=" hide-auto-height");f.units={px:{min:-2E3,max:2E3},"%":"",em:{min:-20,max:20}};const g=b.create([f]);f.wrap_class="";f.label="mi_wd";f.id="min_"+a.id;f.prop="min-width";const h=b.create([f]);b.styles[f.id]={prop:f.prop,selector:a.selector};f.label="ma_wd";f.id="max_"+a.id;f.prop="max-width";const l=b.create([f]);b.styles[f.id]={prop:f.prop,selector:a.selector};b.afterRun.push(function(){const a= d.parentNode.closest(".tb_field");a.parentNode.insertBefore(g,a);a.parentNode.insertBefore(l,a.nextSibling);a.parentNode.insertBefore(h,a.nextSibling)});return c}},position:{render(a,b){const c={top:b.label.top,right:b.label.right,bottom:b.label.bottom,left:b.label.left},d=h.createElement("ul"),e=h.createElement("li"),f=h.createDocumentFragment(),g=h.createDocumentFragment(),k=a.id,l=p.extend(!0,{},a),u=p.extend(!0,{},a);u.options=[];u.option_js=!0;u.id=k+"-type";u.no_toggle=!0;u["default"]="top"; u.prop=null;d.className="tb_seperate_items tb_group_element_position";for(let d in c){let e=h.createElement("li"),g=k+"_"+d;u.options.push({value:d,name:b.label[c[d]],icon:'<i class="tic-border-'+d+'"></i>',label_class:"tb_radio_label_borders"});e.className="tb_group_element_"+d;b.styles[g]={prop:d,selector:a.selector};l.id=g;l.type="range";l.prop="position";l.wrap_class="range_wrapper "+g;l.units={px:{min:-2E3,max:2E3},"%":""};e.appendChild(b.range.render(l,b));b.styles[g+"_auto"]={prop:"position", selector:a.selector};e.appendChild(b.checkboxGenerate("checkbox",{id:g+"_auto",is_position:!0,posId:g,prop:d,type:"checkbox",selector:a.selector,options:[{name:"auto",value:b.label.auto}],wrap_checkbox:"tf_inline_b",binding:{checked:{hide:g},not_checked:{show:g}}}));f.appendChild(e)}e.appendChild(b.radioGenerate("icon_radio",u,b));d.insertBefore(e,d.childNodes[0]);d.appendChild(f);b.styles[k]={prop:"position",selector:a.selector};l.id=k;l.binding={empty:{hide:"tb_group_element_position"},absolute:{show:"tb_group_element_position"}, fixed:{show:"tb_group_element_position"},relative:{hide:"tb_group_element_position"},"static":{hide:"tb_group_element_position"}};l.type="select";l.prop="position";l.options={"":"",absolute:b.label.abs,fixed:b.label.fi,relative:b.label.re,"static":b.label.st};l.class="tb_position_field tb_multi_field";g.appendChild(b.select.render(l,b));g.appendChild(d);return g}},transform:{_label(a){const b=h.createElement("div"),c=h.createElement("span");b.className="tb_label";c.className="tb_label_text";c.textContent= a;b.appendChild(c);return b},_xy(a,b,c,d,e){const f=h.createElement("li");f.appendChild(this._label(e));e=p.extend(!0,{},c);e.prop=a;e.orig_id=c.id;e.options=[{id:"top",label:"X"},{id:"bottom",label:"Y"}];e.units=b;e.id=c.id+"_"+a;f.appendChild(d.createMarginPadding(c.type,e));return f},_rotate(a,b){const c=h.createElement("li");c.appendChild(this._label(b.label.ro));a.orig_id=a.id;const d=["x","y","z"],e=h.createElement("ul");e.className="tb_seperate_items tf_inline_b tf_left tb_tr_rotate";const f= p.extend(!0,{},a);for(let c in d){if(!d.hasOwnProperty(c))continue;let g=h.createElement("li");f.id=a.id+"_rotate_"+d[c];f.prop="rotate";f.tooltip=d[c];g.appendChild(b.angle.render(f,b));e.appendChild(g)}c.appendChild(e);return c},render(a,b){const c=h.createDocumentFragment(),d=h.createElement("ul");d.className="tb_seperate_items tb_transform_fields";d.appendChild(this._xy("scale",{x:{min:-100,max:1E3,increment:.1}},a,b,b.label.sc));d.appendChild(this._xy("translate",{px:{min:-2E3,max:2E3},"%":{min:-100, max:100},em:{min:0,max:100}},a,b,b.label.tl));d.appendChild(this._rotate(a,b));d.appendChild(this._xy("skew",{deg:{min:-180,max:180}},a,b,b.label.sk));c.appendChild(d);return c}}}})(jQuery,Themify,window.top,document);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка