'use strict';var ThemifyConstructor;
(function(A,E,H,l){let t={ActionBar:{}},L="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 c in themifyBuilder.modules)b+=c;themifyBuilder.cache_data&&(b+=themifyBuilder.cache_data);
localStorage.setItem(this.key,JSON.stringify({val:a,h:E.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 c in themifyBuilder.modules)b+=c;themifyBuilder.cache_data&&(b+=themifyBuilder.cache_data);return a.h!==E.hash(b)?!1:a.val}catch(a){return!1}},getEl(a){return ThemifyBuilderCommon.Lightbox.$lightbox[0].querySelector("#"+a)},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}L=ThemifyBuilderCommon;t=tb_app}this.breakpointsReverse=Object.keys(themifyBuilder.breakpoints).reverse();this.breakpointsReverse.push("desktop");const c=this;b=c.get();const d=function(e){L.Lightbox.setup();c.data=e;a&&a()};if(!1!==b)d(b);else{let e={};const f=Object.keys(themifyBuilder.modules).length+3,g=function(h){++h;A.ajax({type:"POST",url:themifyBuilder.ajaxurl,dataType:"json",
data:{action:"tb_load_form_templates",tb_load_nonce:themifyBuilder.tb_load_nonce,page:h},success(k){k&&(e=Object.assign(e,k),f>Object.keys(e).length?g(h):(d(e),c.set(e),e=h=null))}})};g(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 e=0,f=b.length;e<f;++e)""!==b[e].value&&"default"!==b[e].value&&(c.font_select.safe[b[e].value]=b[e].name);c.static.fonts.safe=null;b=c.static.fonts.google;
for(let e=0,f=b.length;e<f;++e)""!==b[e].value&&"default"!==b[e].value&&(c.font_select.google[b[e].value]={n:b[e].name,v:b[e].variant.map(function(g){return g="string"===typeof g?g.replace("i","italic").replace("r","regular"):g.toString()})});c.static.fonts.google=b=themifyBuilder.google=null;b=c.static.fonts.cf;for(let e=0,f=b.length;e<f;++e)""!==b[e].value&&"default"!==b[e].value&&(c.font_select.cf[b[e].value]={n:b[e].name,v:b[e].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=l.createElement("ul"),b=this.breakpointsReverse,c=this;a.className="tb_lightbox_switcher tf_clearfix";for(let d=b.length-1;-1<d;--d){let e=b[d],f=l.createElement("li"),g=l.createElement("a");g.href="#"+e;g.className=
"tab_"+e;g.title="tablet_landscape"===e?this.label.table_landscape:e.charAt(0).toUpperCase()+e.substr(1);g.appendChild(t.Utils.getIcon("ti-"+("tablet_landscape"===e?"tablet":e)));f.appendChild(g);a.appendChild(f)}a.addEventListener("click",function(d){d.preventDefault();d.stopImmediatePropagation();d.target!==a&&(d=d.target.closest("a"),null!==d&&c.lightboxSwitch(d.getAttribute("href")))});return a},lightboxSwitch(a){a=a.replace("#","");a!==t.activeBreakPoint&&(t.activeModel&&"visual"===t.mode&&(t.scrollTo=
t.liveStylingInstance.$liveStyledElmt),A(".tb_breakpoint_switcher.breakpoint-"+a,H.document).trigger("click"))},binding(a,b,c,d){var e=!1,f=b.binding,g=b.type;"select"===g&&0==c&&(c="");if("video"===g)if(""==c)e=f.empty;else if(e=E.parseVideo(c),"youtube"===e.type||"vimeo"===e.type)e=f.external;else{try{var h=new URL(c)}catch(p){h=!1}e=!1!==h&&window.top.location.hostname===h.hostname?f.local:f.empty}else c||void 0===f.empty?c&&void 0!==f[c]?e="radio"===g||"icon_radio"===g?!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=H.document.getElementById("tb_lightbox_container")));f=void 0!==e.hide;h=void 0!==e.show;const p=this;a=[];const q=function(n,r){let v;const u=Object.keys(n);for(let w=
0,x=u.length;w<x;++w){if(void 0!==n[u[w]].id&&n[u[w]].id===r){v=n[u[w]];break}if(n[u[w]]&&"object"===typeof n[u[w]]&&(v=q(n[u[w]],r),void 0!==v))break}return v};c=function(n,r,v){const u=n.dataset.type;let w;"radio"===u?(w=n.querySelector("input:checked"),null===w&&(w=n.getElementsByTagName("input")[0])):"checkbox"===u||"toggle_switch"===u?w=n.getElementsByTagName("input")[0]:"select"===u&&(w=n.getElementsByTagName("select")[0]);void 0!==w&&(("radio"===u||"checkbox"===u||"toggle_switch"===u)&&w.checked&&
n.classList.contains("_tb_hide_binding")&&(w.checked=!1),p.binding(w,r,w.value,v))};!0!==h||Array.isArray(e.show)||(e.show=[e.show]);!0!==f||Array.isArray(e.hide)||(e.hide=[e.hide]);g=!0===h?e.show:[];!0===f&&(g=g.concat(e.hide));for(let n=0,r=g.length;n<r;++n){if(!0===f&&void 0!==e.hide[n]){g=d.querySelectorAll("."+e.hide[n]);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=q(this.data[this.type][this.clicked],
e.hide[n]);"object"===typeof m&&"object"===typeof m.binding&&a.push({el:g[k],data:m})}}if(!0===h&&void 0!==e.show[n])for(g=d.querySelectorAll("."+e.show[n]),k=g.length-1;-1<k;--k)"ajax_filter"===e.show[n]&&"post_filter"===b.id&&0<d.querySelectorAll("#auto_tiles.selected").length||(g[k].classList.remove("_tb_hide_binding"),"object"===typeof this.data&&null!==this.type&&"object"===typeof this.data[this.type]&&(m=q(this.data[this.type][this.clicked],e.show[n]),"object"===typeof m&&"object"===typeof m.binding&&
a.push({el:g[k],data:m})))}for(b=a.length-1;-1<b;--b)c(a[b].el,a[b].data,d);if(void 0!==e.responsive&&void 0!==e.responsive.disabled)for(Array.isArray(e.responsive.disabled)||(e.responsive.disabled=[e.responsive.disabled]),a=e.responsive.disabled,b="desktop"!==t.activeBreakPoint,a=a.length-1;-1<a;--a)if(void 0!==e.responsive.disabled[a])for(c=d.querySelectorAll("."+e.responsive.disabled[a]),f=c.length-1;-1<f;--f)c[a].classList.toggle("responsive_disable",b)}},control:{init(a,b,c){c.name=b;this[b].call(this,
a,c)},preview(a,b,c){if("visual"===t.mode){const g=ThemifyConstructor;let h=null,k=null;!0===c.repeat&&(k=a.closest(".tb_toggleable_fields"),null===k&&(k=a.closest(".tb_sort_fields_parent"),null===k&&(k=a.closest(".tb_row_js_wrapper"))));if(void 0!==c.selector&&b)if(h=t.liveStylingInstance.$liveStyledElmt[0].querySelectorAll(c.selector),0===h.length)h=null;else if(null!==k){var d=a.closest(".tb_repeatable_field");let m=k.children,p=null;for(let q=0,n=m.length-1;q<n;++q)if(m[q]===d){p=q;break}void 0!==
c.rep?(h=t.liveStylingInstance.$liveStyledElmt[0].querySelectorAll(c.rep),void 0!==h[p]&&(m=h[p].querySelectorAll(c.selector),0===m.length&&(m=null))):m=null!==p&&void 0!==h[p]?[h[p]]:null;if(null!==m&&void 0!==m)for(h=[],d=m.length-1;-1<d;--d){var e=m[d].closest(".tf_swiper-slide");if(null!==e){if(e=e.closest(".tf_swiper-wrapper"),null!==e){e=e.querySelectorAll('.tf_swiper-slide[data-swiper-slide-index="'+p+'"]');var f=e.length;if(0!==f)for(--f;-1<f;--f)for(let q=e[f].querySelectorAll(c.selector),
n=q.length-1;-1<n;--n)h.push(q[n]);else h.push(m[d])}}else h.push(m[d])}else h=null}null!==k?g.settings[k.id]=t.Utils.clear(t.Forms.parseSettings(k).v):g.settings[c.id]=b;"refresh"===c.type||!0===g.is_ajax?t.activeModel.trigger("custom:preview:refresh",g.settings,h,b):t.activeModel.trigger("custom:preview:live",g.settings,"wp_editor"===c.name||"TEXTAREA"===a.tagName,null,h,b)}else t.activeModel.backendLivePreview();t.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(f){const g=f.target;if("keyup"===f.type){if(g.value===g.dataset.oldValue)return;g.dataset.oldValue=g.value}c.preview(g,g.value,b)},d),{passive:!0})},wp_editor(a,b){A(".wrap > #message").attr("id","wp-message");let c=this,d=A(a);var e=a.id;let f=!1,g=!1,h=_.throttle(function(k){k="setupeditor"===this.type?this.getContent():this.value;null!==t.activeModel&&f!==k&&(f=k,!1!==g?(a.value=k,d.trigger("change")):
c.preview(a,k,b))},"refresh"===b.type&&void 0===b.selector?1E3:50);t.Utils.initQuickTags(e);"undefined"!==typeof tinyMCE&&(void 0!==tinymce.editors[e]&&tinyMCE.execCommand("mceRemoveEditor",!0,e),e=t.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",h));d.on("change keyup",h)},layout(a,b){if("visual"===t.mode){const c=this;a.addEventListener("change",function(d){d=d.detail.val;0===d.indexOf("grid-")?
d=d.replace("grid-","grid"):isNaN(d)||(d="grid"+d);if(void 0!==b.classSelector&&"auto_tiles"!==d){const e=b.id,f=""!==b.classSelector?t.liveStylingInstance.$liveStyledElmt.find(b.classSelector).first():t.liveStylingInstance.$liveStyledElmt;let g=ThemifyConstructor.settings[e];g&&(0===g.indexOf("grid-")?g=g.replace("grid-","grid"):isNaN(g)||(g="grid"+g));ThemifyConstructor.settings[e]=d;0<f.length?(f.removeClass(g).addClass(d),t.Utils.runJs(t.liveStylingInstance.$liveStyledElmt,"module")):c.preview(this,
d,b)}else c.preview(this,d,b)},{passive:!0})}},icon(a,b){const c=this;a.addEventListener("change",function(d){const e=d.target.value,f=this.closest(".tb_field").getElementsByClassName("themify_fa_toggle")[0];void 0!==f&&(f.firstChild&&f.firstChild.remove(),e&&f.appendChild(t.Utils.getIcon(e)));c.preview(d.target,e,b)},{passive:!0})},checkbox(a,b){if("visual"===t.mode){const c=this;a.addEventListener("change",function(){const d=[],e=this.closest(".themify-checkbox").getElementsByClassName("tb-checkbox");
for(let f=0,g=e.length;f<g;++f)e[f].checked&&d.push(e[f].value);c.preview(this,d.join("|"),b)},{passive:!0})}},color(a,b){if("visual"===t.mode){const c=this;a.addEventListener("themify_builder_color_picker_change",function(d){c.preview(this,d.detail.val,b)},{passive:!0})}},widget_select(a,b){this.preview(a,a.find(":input").themifySerializeObject(),b)},queryPosts(a,b){if("visual"===t.mode){const c=this;a.addEventListener("queryPosts",function(d){b.id=this.id;ThemifyConstructor.settings=t.Utils.clear(t.Forms.serialize("tb_options_setting"));
c.preview(this,ThemifyConstructor.settings[b.id],b)},{passive:!0})}}},initControl(a,b){if(null!==t.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"===t.mode&&"styling"===this.clicked&&t.liveStylingInstance.bindEvents(a,b);if(void 0!==b.binding){const c=this,d=!0===c.is_repeat,
e=function(f,g){let h;d&&(h=a.closest(".tb_sort_field_dropdown"),null===h&&(h=a.closest(".tb_toggleable_fields_options"),null===h&&(h=a.closest(".tb_repeatable_field_content"))));c.binding(f,b,g,h)};"layout"===b.type||"frame"===b.type?a.addEventListener("click",function(f){f=f.target.closest(".tfl-icon");null!==f&&e(this,f.id)},{passive:!0}):a.addEventListener("change",function(f){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=H.document.getElementById(a.replace("#","")));if(e&&!b.classList.contains("current")){var f=c.children;d=e.parentNode.children;for(let g=f.length-1;-1<g;--g)f[g].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";E.body.triggerHandler("themify_builder_tabsactive",
[a,e]);E.triggerEvent(e,"themify_builder_tabsactive",{id:a});t.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=t.activeModel,g;null!==f?(this.component=f.get("elType"),e=l.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=A.extend(!0,{},f.get(d)),void 0!==e&&(t.beforeEvent=L.clone(e)),e=void 0!==f.get("visibileClicked"),d=!1===e&&("column"===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 h=l.createDocumentFragment();a=l.createDocumentFragment();
const k=this;var m={styling:"ti-brush",animation:"ti-layers-alt",visibility:"ti-eye"};const p=function(n,r){const v=l.createElement("div"),u=l.createDocumentFragment();v.className="tb_options_tab_content";if("visibility"===n||"animation"===n)r=k.static[n];else if("styling"===n){const w=l.createElement("div"),x=t.GS.globalStylesHTML();w.className="tb_styling_tab_header";w.appendChild(k.getSwitcher());x&&w.appendChild(x);u.appendChild(w)}v.appendChild(k.create(r));u.appendChild(v);"styling"===n&&(n=
l.createElement("a"),r=l.createElement("i"),n.href="#",n.className="reset-styling",r.className="tf_close",n.appendChild(r),n.appendChild(l.createTextNode(k.label.reset_style)),n.addEventListener("click",k.resetStyling.bind(k)),u.appendChild(n),"visual"===t.mode&&f&&setTimeout(function(){t.liveStylingInstance.module_rules=k.styles},600));r=null;return u};this.clicked=null;for(var q in c){if(!1===c[q])continue;let n=l.createElement("li"),r=l.createElement("a"),v=l.createElement("span"),u=l.createElement("div"),
w=void 0!==c[q].name?c[q].name:this.label[q],x="tb_options_"+q;r.href="#"+x;r.textContent=w;"setting"!==q&&(r.className="tb_tooltip",v.textContent=w,m[q]&&r.appendChild(t.Utils.getIcon(m[q])),r.appendChild(v));u.id=x;u.className="tb_tab tb_options_tab_wrapper";if(!0===d&&"styling"===q||!0===e&&"visibility"===q||!1===d&&!1===e&&"setting"===q||null===this.component)n.className="current",k.clicked=q,void 0!==c[q].html?u.appendChild(c[q].html):u.appendChild(p(q,c[q].options)),u.style.display="block",
u.dataset.done=!0;u.addEventListener("themify_builder_tabsactive",function(C){C=C.detail.id.replace("#tb_options_","");k.clicked=C;void 0===this.dataset.done&&(this.dataset.done=!0,this.appendChild(p(C,c[C].options)),k.callbacks(),"setting"===C&&k.setUpEditors())},{passive:!0});r.addEventListener("click",this.switchTabs);a.appendChild(u);n.appendChild(r);h.appendChild(n)}q=L.Lightbox.$lightbox[0].getElementsByClassName("tb_options_tab")[0];for(m=L.Lightbox.$lightbox[0].getElementsByClassName("tb_lightbox_actions_wrap")[0];null!==
q.firstChild;)q.removeChild(q.lastChild);for(;null!==m.firstChild;)m.removeChild(m.lastChild);q.appendChild(h);if(void 0!==b||f){const n=l.createElement("button");n.className="builder_button builder_save_button";n.title=void 0!==b&&void 0!==b.ctr_save?this.label[b.ctr_save]:this.label.ctr_save;n.textContent=void 0!==b&&void 0!==b.done?this.label[b.done]:this.label.done;if(f){t.autoSaveCid=f.cid;"visual"===t.mode&&(null!==t.GS.activeGS?(t.liveStylingInstance=t.createStyleInstance(),t.liveStylingInstance.init(null,
!0)):(null===t.liveStylingInstance&&(t.liveStylingInstance=t.createStyleInstance()),t.liveStylingInstance.init()),g=t.liveStylingInstance.$liveStyledElmt[0].outerHTML);const r=function(u){u.preventDefault();u.stopImmediatePropagation();k.saveComponent(!1)&&(n.removeEventListener("click",r),v.removeEventListener("click",r,{once:!0}))},v=l.createElement("a");b=l.createElement("li");h=l.createElement("span");b.className="tb_top_save_btn";v.className="tb_tooltip";h.textContent=this.label.done;v.appendChild(t.Utils.getIcon("ti-check"));
v.appendChild(h);b.appendChild(v);q.appendChild(b);n.addEventListener("click",r);v.addEventListener("click",r,{once:!0})}m.appendChild(n)}E.body.one("themify_builder_lightbox_close",function(){k.radioChange=k.afterRun=k.bindings=k.editors=[];k.stylesData=k.settings=k.styles={};k.is_ajax=k.is_repeat=k.is_sort=k.clicked=null;if(f){var n;k.is_new&&"module"===t.activeModel.get("elType")&&(n=("visual"===t.mode?t.liveStylingInstance.$liveStyledElmt:E.body.find(".tb_element_cid_"+t.activeModel.cid)).closest(".module_row.tb_new_row"));
if(!0!==t.saving&&void 0!==g&&t.hasChanged){const r=t.Models.Registry.lookup(f.cid);r&&r.trigger("custom:restorehtml",g)}k.is_new?(f.unset("is_new",{silent:!0}),!0!==t.saving?(f.trigger("dom:module:unsaved"),void 0!==n&&0<n.length&&(n=t.Models.Registry.lookup(n.data("cid")))&&n.destroy()):void 0!==n&&0<n.length&&n[0].classList.remove("tb_new_row")):(f.unset("styleClicked",{silent:!0}),f.unset("visibileClicked",{silent:!0}));"visual"===t.mode&&t.liveStylingInstance.clear();t.activeModel=f=null;if("undefined"!==
typeof tinyMCE)for(n=tinymce.editors.length-1;-1<n;--n)"content"!==tinymce.editors[n].id&&tinyMCE.execCommand("mceRemoveEditor",!0,tinymce.editors[n].id)}E.body.off("themify_builder_change_mode.updatestyles");g=c=k.type=k.component=k.is_new=null;k.values={};k.tabs.click=0}).on("themify_builder_change_mode.updatestyles",this.updateStyles.bind(this));setTimeout(function(){"setting"===k.clicked&&k.setUpEditors();k.callbacks();E.triggerEvent(l,"tb_editing_"+k.type);"module"===k.component&&E.triggerEvent(l,
"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(""!==a&&null!==t.activeModel){void 0===c&&(c=this.values);void 0===b&&(b=t.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=this.getEl(d);e="layout"===e?f.getElementsByClassName("tfl-icon"):"radio"===e||"checkbox"===e?f.getElementsByTagName("input"):[f];f=this.stylesData[d];
for(let g=0,h=e.length;g<h;++g)this.binding(e[g],f,b)}}d=H.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=t.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){t.saving=
!0;var b=t.Forms;const e="module"===this.component;if(e&&!b.isValidate(H.document.getElementById("tb_options_setting"))||void 0!==L.Lightbox.$lightbox[0].getElementsByClassName("tb_disable_save")[0])return t.saving=!1,t.beforeEvent=null,a&&(t.hasChanged=!0,L.Lightbox.$lightbox.find(".tb_close_lightbox")[0].click()),!1;E.body.triggerHandler("themify_builder_save_component",a);"visual"===t.mode&&H.jQuery("body").triggerHandler("themify_builder_save_component",a);delete this.values.cid;const f=A.extend(!0,
{},this.beforeData?this.beforeData:this.values);let g=!1,h="styling",k=l.getElementsByClassName("tb_element_cid_"+t.activeModel.cid)[0];void 0===k&&(k=l.querySelector('[data-cid="'+t.activeModel.cid+'"]'));if(null!==k){k=A(k);var c=b.serialize("tb_options_setting",!0);for(let p in c)this.values[p]=c[p];if("column"!==this.component){e&&(h="mod_settings");c=b.serialize("tb_options_animation",!0);for(let p in c)this.values[p]=c[p];b=b.serialize("tb_options_visibility",!0);for(var d in b)this.values[d]=
b[d];"visual"===t.mode&&("hide_all"===b.visibility_all||"hide"===b.visibility_desktop||"hide"===b.visibility_tablet||"hide"===b.visibility_tablet_landscape||"hide"===b.visibility_mobile?k[0].classList.add("tb_visibility_hidden"):k[0].classList.remove("tb_visibility_hidden"))}this.setStylingValues(t.activeBreakPoint);d={};d[h]=A.extend(!0,{},t.Utils.clear(this.values));t.activeModel.set(A.extend(!0,{},d),{silent:!0});e&&(this.is_new&&(g=k.closest(".module_column"),g.closest(".module_row").removeClass("tb_row_empty"),
g.closest(".active_subrow").removeClass("tb_row_empty"),g=L.clone(g)),t.Instances.Builder[t.builderIndex].removeLayoutButton());let m;"visual"===t.mode&&(m=A.extend(!0,{},t.liveStylingInstance.undoData),k[0].classList.remove("tb_visual_hover"),k.find(".tb_visual_hover").removeClass("tb_visual_hover"));t.ActionBar.hoverCid===t.activeModel.cid&&(t.ActionBar.hoverCid=null,t.ActionBar.clearSelected());t.undoManager.push(t.activeModel.cid,t.beforeEvent,k,"save",{bsettings:f,asettings:this.values,styles:m,
column:g})}L.Lightbox.close(a);t.beforeEvent=null;t.saving=!1}return!0},resetStyling(a,b){a.preventDefault();a.stopPropagation();b=!0===b?void 0:A("#tb_options_styling",ThemifyBuilderCommon.Lightbox.$lightbox)[0];var c=t.activeModel.get("elType");"module"===c&&(c=t.activeModel.get("mod_name"));if(!this.beforeData&&(this.beforeData=A.extend(!0,{},this.values),void 0!==b)){const p=this;E.body.one("themify_builder_lightbox_before_close",function(){p.beforeData=null})}if(!1===t.GS.isGSPage&&null===t.GS.activeGS){var d=
null;if(null!==t.GS.el){var e=t.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[t.GS.key]&&("visual"===t.mode&&(d=this.values[t.GS.key].split(" ")),delete this.values[t.GS.key]);if(null!==d){null!==t.GS.field&&(t.GS.field.value="");t.GS.isGSPage=!0;for(e=d.length-1;-1<e;--e)t.GS.delete(d[e]);t.GS.isGSPage=!1;d=null;t.GS.generateValues(null,{},!0)}}f=ThemifyStyles.getStyleOptions(c);d={};e={};
if("visual"===t.mode){var g=t.liveStylingInstance.prefix,h=this.breakpointsReverse;for(let p=h.length-1;-1<p;--p){var k=ThemifyStyles.getSheet(h[p],null!==t.GS.activeGS);k=k.cssRules?k.cssRules:k.rules;if(0<k.length){void 0===d[h[p]]&&(d[h[p]]={},e[h[p]]={});for(let q=k.length-1;-1<q;--q)if(-1!==k[q].selectorText.indexOf(g)){let n=k[q].cssText.split("{")[1].split(";");void 0===d[h[p]][q]&&(d[h[p]][q]={},e[h[p]][q]={});for(let r=n.length-2;-1<r;--r){let v=n[r].trim().split(": ")[0].trim();if(void 0!==
k[q].style[v]){let u=k[q].style[v];d[h[p]][q][v]=u;e[h[p]][q][v]={a:"",b:u};k[q].style[v]=""}}}}}"module"!==c&&(t.liveStylingInstance.removeBgSlider(),t.liveStylingInstance.removeBgVideo(),t.liveStylingInstance.getComponentBgOverlay(c).remove(),t.liveStylingInstance.bindBackgroundMode("repeat","background_repeat"),t.liveStylingInstance.bindBackgroundMode("repeat","b_r_h"),t.liveStylingInstance.$liveStyledElmt[0].removeAttribute("data-tb_slider_videos"),t.liveStylingInstance.$liveStyledElmt.children(".tb_slider_videos,.tb_row_frame").remove())}for(var m in this.values)c=
-1!==m.indexOf("_color")?"color":-1!==m.indexOf("_style")?"style":!1,g=null,0===m.indexOf("breakpoint_")||m===t.GS.key||void 0!==f[m]||-1!==m.indexOf("_apply_all")?g=!0:-1!==m.indexOf("_unit")?(c=m.replace(/_unit$/ig,"",""),void 0!==f[c]&&(g=!0)):-1!==m.indexOf("_w")?(c=m.replace(/_w$/ig,"",""),void 0!==f[c]&&"font_select"===f[c].type&&(g=!0)):!1!==c&&(c=m.replace("_"+c,"_width"),void 0!==f[c]&&"border"===f[c].type&&(g=!0)),!0===g&&delete this.values[m];if(void 0!==b){t.hasChanged=!0;m=b.getElementsByClassName("tb_lb_option");
for(c=m.length-1;-1<c;--c)if(f=m[c].value,g=m[c].classList,"px"!==f&&"solid"!==f&&"default"!==f&&"linear"!==f&&"n"!==f&&!g.contains("exclude-from-reset-field"))if(h=m[c].getAttribute("id"),void 0!==this.values[h]&&delete this.values[h],g.contains("tb_radio_input_container"))g.contains("tb_icon_radio")?(f=b.querySelector('[name="'+h+'"]:checked'),null!==f&&f.parentNode.click()):(f=b.querySelector('[name="'+h+'"]'),!0!==f.checked&&(f.checked=!0,E.triggerEvent(f,"change")));else if(g.contains("tb_uploader_input"))f&&
m[c].parentNode.getElementsByClassName("tb_clear_input")[0].click();else if(g.contains("tfminicolors-input"))g=m[c].closest(".tfminicolors"),h=g.getElementsByClassName("tb_clear_btn")[0],f&&(m[c].value="",m[c].removeAttribute("data-opacity"),f=g.getElementsByClassName("tfminicolors-swatch-color")[0],f.style.opacity=f.style.backgroundColor="",g.nextElementSibling.value=""),void 0!==h&&(h.style.display="none");else if(f&&"SELECT"===m[c].tagName){if(g.contains("font-family-select"))m[c].value="";else if(g.contains("font-weight-select")){for(m[c].value=
"";m[c].firstChild;)m[c].removeChild(m[c].lastChild);this.font_select.updateFontVariant("",m[c],this)}else if(g.contains("tb_unit"))m[c].value=g.contains("tb_frame_unit")?"%":"px";else{if("repeat"===f&&"background_repeat"===h||"scroll"===f&&"background_attachment"===h||"left top"===f&&"background_position"===h)continue;m[c].selectedIndex=0}g.contains("themify-gradient-type")||E.triggerEvent(m[c],"change")}else if(g.contains("themify-layout-icon"))f=m[c].getElementsByClassName("tfl-icon")[0],f.classList.contains("selected")||
f.click();else if(g.contains("tb_row_js_wrapper")){f=m[c].getElementsByClassName("tb_repeatable_field");for(g=f.length-1;-1<g;--g)f[g].remove();m[c].getElementsByClassName("add_new")[0].click()}else g.contains("tb_angle_input")&&g.contains("tb_transform_field")?m[c].value="":g.contains("tb_angle_input")?m[c].value="180":g.contains("themify-gradient")?m[c].nextElementSibling.click():(m[c].value="",E.triggerEvent(m[c],g.contains("tb_range")?"keyup":"change"));"visual"!==t.mode||a.isTrigger||(t.liveStylingInstance.tempData=
d,t.liveStylingInstance.undoData=e)}return e},create(a){const b=l.createDocumentFragment();if(void 0===a||0===a.length){a=l.createElement("div");var c=l.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"===t.mode&&void 0!==a[c].prop&&(this.styles[e]=A.extend(!0,{},a[c])),this.stylesData[e]=A.extend(!0,{},a[c])):"visual"===t.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("hook_content"!==d&&"slider"!==d&&"builder"!==d&&"tooltip"!==d&&"custom_css_id"!==d){let g=l.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);"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 h=l.createElement("div"),
k=l.createElement("span");h.className="tb_label";k.className="tb_label_text";k.textContent=e;h.appendChild(k);""===e&&(h.className+=" tb_empty_label");void 0!==a[c].help&&""!==a[c].label&&(h.classList.add("contains-help"),k.appendChild(this.help(a[c].help)));g.appendChild(h);"multi"!==d?(d=l.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=l.createDocumentFragment(),e=l.createElement("ul"),f="styling"===b.clicked&&0===this.click&&"module"===b.component?l.createElement("div"):null,g=l.createElement("div"),h=void 0!==a.isRadio;let k=null,m=null;g.className="tb_tabs";e.className="tb_tab_wrapper tf_scrollbar tf_clearfix";++this.click;!0===h&&(void 0!==b.values[a.id]&&""!==b.values[a.id]&&(m=!0,k=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 p in c){let q=l.createElement("li"),n=!0===h?l.createElement("label"):l.createElement("a"),r=l.createElement("div"),v=void 0!==c[p].href?c[p].href:"tb_"+this.click+"_"+p,u=c[p].options;r.id=v;r.className="tb_tab";""!==c[p].label&&(n.textContent=void 0!==c[p].label?c[p].label:b.label[p]);void 0!==c[p].icon&&n.appendChild(t.Utils.getIcon(c[p].icon));void 0!==c[p].title&&(n.title=c[p].title);void 0!==c[p].class&&
""!==c[p].class&&(n.className=c[p].class);if(!0===h){let w=l.createElement("input");w.type="radio";w.className="tb_radio_tab_input";w.name=a.id;if(k===p||k==="tb_"+p)w.checked=!0;w.value=p;n.setAttribute("href","#"+v);n.className="tb_radio_tab_label";n.appendChild(w)}else n.href="#"+v;null===m||k===p||k==="tb_"+p?(m=!0,q.className="current",r.appendChild(b.create(u)),u=null,r.style.display="block"):r.addEventListener("themify_builder_tabsactive",function(){this.appendChild(b.create(u));"setting"===
b.clicked&&b.setUpEditors();b.callbacks();u=null},{once:!0,passive:!0});n.addEventListener("click",b.switchTabs);q.appendChild(n);e.appendChild(q);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=l.createElement("div");var d=a.display||"";b=b.create(a.options);void 0!==a.wrap_class&&(c.className=a.wrap_class);c.classList.add("tb_field_group");if("accordion"===
d){c.classList.add("tb_field_group_acc");const e=l.createElement("div"),f=l.createElement("div");d=t.Utils.getIcon("ti-angle-up");e.textContent=a.label;e.className="tb_style_toggle tb_closed";e.appendChild(d);f.className="tf_hide tb_field_group_content";f.appendChild(b);e.addEventListener("click",function(){A(f).slideToggle();e.classList.toggle("tb_closed")});c.appendChild(e);c.appendChild(f)}else c.appendChild(b);return c}},builder:{render(a,b){b.is_repeat=!0;const c=l.createDocumentFragment(),d=
l.createElement("div"),e=l.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 g=b.values[a.id].slice(),h=A.extend(!0,{},b.values);for(let k=0,m=g.length;k<m;++k)b.values=g[k]||{},d.appendChild(this.builderFields(a,b));b.values=h}else d.appendChild(this.builderFields(a,
b));d.appendChild(e);c.appendChild(d);setTimeout(function(){f.sortable(d,b);e.addEventListener("click",function(g){g.preventDefault();g.stopPropagation();b.is_repeat=!0;const h=f.builderFields(a,b);g=this.previousElementSibling.parentNode;g.insertBefore(h,e);setTimeout(function(){"setting"===b.clicked&&b.setUpEditors();b.callbacks();E.triggerEvent(l,"tb_repeatable_add_new",[h])},5);b.control.preview(g,null,{repeat:!0});b.is_repeat=null})},2E3);b.is_repeat=null;return c},builderFields(a,b){const c=
l.createElement("div"),d=l.createElement("div"),e=l.createElement("div"),f=l.createElement("div"),g=l.createElement("ul"),h=l.createElement("li"),k=l.createElement("li"),m=l.createElement("div"),p=l.createElement("div"),q=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";h.className="tb_duplicate_row";k.className="tb_delete_row tf_close";h.textContent=b.label.duplicate;k.textContent=
b.label.delete;m.className="toggle_row";p.className="tb_repeatable_field_content";p.appendChild(b.create(a.options));g.appendChild(h);g.appendChild(k);e.appendChild(f);e.appendChild(g);d.appendChild(e);d.appendChild(m);c.appendChild(d);c.appendChild(p);d.addEventListener("click",function(n){n.stopPropagation();n.preventDefault();const r=n.target.classList,v=this.parentNode;if(r.contains("tb_delete_row")){if(confirm(themifyBuilder.i18n.rowDeleteConfirm)){const u=n.target.closest(".tb_row_js_wrapper");
q.delete(n.target);b.control.preview(u,null,{repeat:!0});E.triggerEvent(u,"delete")}}else if(r.contains("tb_duplicate_row")){b.is_repeat=!0;n=A.extend(!0,{},b.values);b.values=t.Forms.serialize(v,!0,!0);const u=q.builderFields(a,b);v.parentNode.insertBefore(u,v.nextElementSibling);b.values=n;setTimeout(function(){"setting"===b.clicked&&b.setUpEditors();b.callbacks();E.triggerEvent(v.parentNode,"duplicate");E.triggerEvent(l,"tb_repeatable_duplicate",[u])},5);b.control.preview(v,null,{repeat:!0});b.is_repeat=
null}else r.contains("toggle_row")&&q.toggle(n.target);r.contains("menu_icon")||t.Utils.hideOnClick(g)});return c},sortable(a,b){const c=t.Utils.getMouseEvents();a.addEventListener(c.mousedown,function(d){if(("touchstart"===d.type||1===d.which)&&d.target.classList.contains("tb_repeatable_field_top")){d.stopImmediatePropagation();let e,f,g,h,k,m=0,p,q,n,r={},v=this.ownerDocument,u=d.target.closest(".tb_repeatable_field"),w,x,C,z=!1,D;const I=function(B){B.stopImmediatePropagation();e&&cancelAnimationFrame(e);
e=requestAnimationFrame(function(){if(v){var y=B.touches?B.touches[0].clientX:B.clientX,F=B.touches?B.touches[0].clientY:B.clientY;y="mousemove"===B.type?B.target:v.elementFromPoint(y,F);var G=F-q-D.getBoundingClientRect().top;if(0<G&&G<C){if(p.style.transform="translateY("+G+"px)",J(F),!(F>=x||F<=w)){if(y&&y!==u&&y.classList.contains("tb_repeatable_field")){G=F>m?"bottom":"top";if(h!==G||g!==y)u.style.display="none","bottom"===G?y.after(u):y.before(u),u.style.display="";g=y;h=G}m=F}}else J(F)}})},
J=function(B){if(n)if(B>=x||B<=w){if(!1===z){z=!0;const y=parseInt(x/10);n.scrollTop+=B<=w?-1*y:y;f&&clearTimeout(f);f=setTimeout(function(){requestAnimationFrame(function(){z&&(z=!1,J(B))})},2*y)}}else f&&clearTimeout(f),z=!1},K=function(B){v.body.classList.add("tb_start_animate","tb_move_drag");t.Utils.hideOnClick(u.getElementsByClassName("tb_down")[0]);D=u.parentNode;D.classList.add("tb_sort_start");if("undefined"!==typeof tinyMCE){var y=D.getElementsByClassName("tb_lb_wp_editor");for(let F=y.length-
1;-1<F;--F){let G=y[F].id;r[G]=tinymce.get(G).getContent();tinyMCE.execCommand("mceRemoveEditor",!1,G)}}u.classList.contains("collapsed")||(u.getElementsByClassName("tb_repeatable_field_content")[0].style.display="none",u.classList.add("collapsed"),k=!0);p=u.cloneNode(!0);p.getElementsByClassName("tb_repeatable_field_content")[0].remove();n=u.closest(".tf_scrollbar");p.className+=" tb_sort_handler";u.classList.add("tb_current_sort");u.after(p);q=p.getBoundingClientRect().height/2;C=D.offsetHeight;
y=n.getBoundingClientRect();w=y.top;x=y.bottom-40;I(B)};v.addEventListener(c.mouseup,function(B){this.removeEventListener(c.mousemove,K,{passive:!0,once:!0});this.removeEventListener(c.mousemove,I,{passive:!0});if(D){B.stopImmediatePropagation();e&&cancelAnimationFrame(e);f&&clearTimeout(f);p&&p.remove();if("undefined"!==typeof tinyMCE)for(let y in r)tinyMCE.execCommand("mceAddEditor",!1,y),tinymce.get(y).setContent(r[y]);u.classList.remove("tb_current_sort");k&&(u.classList.remove("collapsed"),u.getElementsByClassName("tb_repeatable_field_content")[0].style.display=
"");requestAnimationFrame(function(){b.control.preview(D,null,{repeat:!0});E.triggerEvent(D,"sortable");D.classList.remove("tb_sort_start");D=null})}this.body.classList.remove("tb_start_animate","tb_move_drag");g=p=k=h=m=r=n=v=C=q=z=w=x=u=e=f=null},{passive:!0,once:!0});v.addEventListener(c.mousemove,K,{passive:!0,once:!0});v.addEventListener(c.mousemove,I,{passive:!0})}},{passive:!0})},toggle(a){A(a).closest(".tb_repeatable_field").toggleClass("collapsed").find(".tb_repeatable_field_content").slideToggle()},
delete(a){a=a.closest(".tb_repeatable_field");E.triggerEvent(l,"tb_repeatable_delete",[a]);a.remove()}},accordion:{expand(a,b,c){a.addEventListener("click",function(d){let e=this.getElementsByClassName("tb_accordion_fields_options")[0];if(void 0===e){e=l.createElement("div");e.style.display="none";e.className="tb_toggleable_fields_options tb_accordion_fields_options";c.is_repeat=!0;let f=null;const g=this.parentNode.closest(".tb_accordion_fields").id,h=this.getAttribute("data-id");void 0!==c.values[g]&&
void 0!==c.values[g][h]&&void 0!==c.values[g][h].val&&(f=A.extend(!0,{},c.values),c.values=c.values[g][h].val);e.appendChild(c.create(b.options));this.appendChild(e);"setting"===c.clicked&&c.setUpEditors();c.callbacks();null!==f&&(c.values=f);c.is_repeat=f=null}else if(e.contains(d.target))return;d.stopPropagation();d.preventDefault();this.classList.contains("tb_closed")?A(e).slideDown(function(){this.parentNode.classList.remove("tb_closed")}):A(e).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=l.createElement("ul"),e=l.createDocumentFragment(),f=l.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],h=function(k,m){const p=l.createElement("li"),q=l.createElement("input"),n=l.createElement("div");n.textContent=
a.options[k].label;n.className="tb_toggleable_fields_title tb_accordion_fields_title tf_plus_icon";q.type="hidden";q.value="";p.className="tb_closed";p.setAttribute("data-id",k);void 0!==m.val&&(q.value=JSON.stringify(m.val));p.appendChild(q);p.appendChild(n);c.expand(p,a.options[k],b);d.appendChild(p)};if(void 0!==g)for(let k in g)void 0!==a.options[k]&&h(k,g[k]);for(let k in a.options)void 0!==g&&void 0!==g[k]||h(k,a.options[k]);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(k){k.preventDefault();k.stopPropagation();c.resetMotion(this,b)}),e.appendChild(f));return e}},toggleable_fields:{sort(a,b){const c=t.Utils.getMouseEvents();a.addEventListener(c.mousedown,function(d){if(!("touchstart"!==d.type&&1!==d.which||d.target.parentNode!==this&&d.target.parentNode.parentNode!==this)){d.stopImmediatePropagation();let e,f,g,h,k,m=0,p,q,n,r={},v=this.ownerDocument,u=d.target.closest(".tb_toggleable_item"),
w,x,C,z=!1,D;const I=function(B){B.stopImmediatePropagation();e&&cancelAnimationFrame(e);e=requestAnimationFrame(function(){if(v){var y=B.touches?B.touches[0].clientX:B.clientX,F=B.touches?B.touches[0].clientY:B.clientY;y="mousemove"===B.type?B.target:v.elementFromPoint(y,F);var G=F-q-D.getBoundingClientRect().top;if(0<G&&G<C){if(p.style.transform="translateY("+G+"px)",J(F),!(F>=x||F<=w)){if(y&&y!==u&&y.classList.contains("tb_toggleable_item")){G=F>m?"bottom":"top";if(h!==G||g!==y)u.style.display=
"none","bottom"===G?y.after(u):y.before(u),u.style.display="";g=y;h=G}m=F}}else J(F)}})},J=function(B){if(n)if(B>=x||B<=w){if(!1===z){z=!0;const y=parseInt(x/10);n.scrollTop+=B<=w?-1*y:y;f&&clearTimeout(f);f=setTimeout(function(){requestAnimationFrame(function(){z&&(z=!1,J(B))})},2*y)}}else f&&clearTimeout(f),z=!1},K=function(B){v.body.classList.add("tb_start_animate","tb_move_drag");D=u.parentNode;D.classList.add("tb_sort_start");if("undefined"!==typeof tinyMCE){var y=D.getElementsByClassName("tb_lb_wp_editor");
for(let F=y.length-1;-1<F;--F){let G=y[F].id;r[G]=tinymce.get(G).getContent();tinyMCE.execCommand("mceRemoveEditor",!1,G)}}u.classList.contains("tb_closed")||((y=u.getElementsByClassName("tb_toggleable_fields_options")[0])&&(y.style.display="none"),u.classList.add("tb_closed"),k=!0);p=u.cloneNode(!0);(y=p.getElementsByClassName("tb_toggleable_fields_options")[0])&&y.remove();n=u.closest(".tf_scrollbar");p.className+=" tb_sort_handler";u.classList.add("tb_current_sort");u.after(p);q=p.getBoundingClientRect().height/
2;C=D.offsetHeight;y=n.getBoundingClientRect();w=y.top;x=y.bottom-40;I(B)};v.addEventListener(c.mouseup,function(B){this.removeEventListener(c.mousemove,K,{passive:!0,once:!0});this.removeEventListener(c.mousemove,I,{passive:!0});if(D){B.stopImmediatePropagation();e&&cancelAnimationFrame(e);f&&clearTimeout(f);p&&p.remove();if("undefined"!==typeof tinyMCE)for(let y in r)tinyMCE.execCommand("mceAddEditor",!1,y),tinymce.get(y).setContent(r[y]);u.classList.remove("tb_current_sort");k&&((B=u.getElementsByClassName("tb_toggleable_fields_options")[0])&&
(B.style.display=""),u.classList.remove("tb_closed"));requestAnimationFrame(function(){b.control.preview(D,null,{repeat:!0});E.triggerEvent(D,"sortable");D.classList.remove("tb_sort_start");D=null})}this.body.classList.remove("tb_start_animate","tb_move_drag");g=p=k=h=m=r=n=v=C=z=q=w=x=u=e=f=null},{passive:!0,once:!0});v.addEventListener(c.mousemove,K,{passive:!0,once:!0});v.addEventListener(c.mousemove,I,{passive:!0})}},{passive:!0})},expand(a,b,c){a.addEventListener("click",function(d){if(this.classList.contains("tb_toggleable_field_disabled")||
d.target.closest(".switch-wrapper"))d.target.closest(".tb_toggleable_fields_options")||(d=this.getElementsByClassName("tb_toggleable_fields_options")[0],A(d).slideUp(function(){this.parentNode.classList.add("tb_closed")}));else{let e=this.getElementsByClassName("tb_toggleable_fields_options")[0];if(!e){e=l.createElement("div");e.style.display="none";e.className="tb_toggleable_fields_options tf_box tf_clear";this.appendChild(e);c.is_repeat=!0;let f=this.closest(".tb_toggleable_fields").id,g=null,h=
this.getAttribute("data-id");void 0!==c.values[f]&&void 0!==c.values[f][h]&&void 0!==c.values[f][h].val&&(g=A.extend(!0,{},c.values),c.values=c.values[f][h].val);e.appendChild(c.create(b.options));"setting"===c.clicked&&c.setUpEditors();c.callbacks();null!==g&&(c.values=g);c.is_repeat=null}else if(e.contains(d.target))return;d.stopPropagation();d.preventDefault();this.classList.contains("tb_closed")?A(e).slideDown(function(){this.parentNode.classList.remove("tb_closed")}):A(e).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=l.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(h,k){const m={type:"toggle_switch",
id:"",options:{on:{name:"1",value:b.label.s},off:{name:"0",value:b.label.hi}},"default":"1"===k.on?"on":"off",control:!1},p=l.createElement("li"),q=l.createElement("input"),n=l.createElement("div"),r=b.create([m]);n.innerHTML+=a.options[h].label;n.className="tb_toggleable_fields_title tf_plus_icon";q.type="hidden";q.value="";p.className="tb_toggleable_item tb_closed";"off"===m["default"]&&(p.className+=" tb_toggleable_field_disabled");p.setAttribute("data-id",h);void 0!==k.val&&(q.value=JSON.stringify(k.val));
r.querySelector(".toggle_switch").addEventListener("change",function(v){v.stopPropagation();c.disable(this,b)},{passive:!0});p.appendChild(q);p.appendChild(n);p.appendChild(r);c.expand(p,a.options[h],b);d.appendChild(p)};if(void 0!==f)for(let h in f)void 0!==a.options[h]&&g(h,f[h]);for(let h in a.options)void 0===f[h]&&g(h,a.options[h]);c.sort(d,b);b.is_repeat=e;return d}},sortable_fields:{getGlobalOptions(a){return[{id:"icon",type:"icon",label:a.label.icon},{id:"before",type:"text",label:a.label.b_t},
{id:"after",type:"text",label:a.label.a_t}]},getDefaults(a,b){return{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}],
text:[{id:"t",type:"textarea","class":"fullwidth"}]}[a]},create(a,b,c,d,e,f){const g=l.createElement("li");var h=b.options[c];if(void 0===h)return l.createDocumentFragment();g.textContent=h.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 if(void 0!==e&&(f=this.find(e,c,!0)),g.setAttribute("data-new",!0),b=L.Lightbox.$lightbox[0].getElementsByClassName(b.id)[0],h=1,d=c+"_"+h,void 0!==b)for(;null!==b.querySelector('[data-id="'+
d+'"]');)++h,d=c+"_"+h;g.setAttribute("data-id",d);c=l.createElement("span");d=l.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(t.Utils.getIcon("ti-pencil"));g.appendChild(d);g.appendChild(c)}return g},sort(a,b){const c=t.Utils.getMouseEvents();a.addEventListener(c.mousedown,function(d){if(("touchstart"===d.type||1===d.which)&&d.target.parentNode===this){let e,
f,g,h=0,k=0,m,p,q,n={},r=this.ownerDocument,v=d.target,u,w;const x=function(z){z.stopImmediatePropagation();e&&cancelAnimationFrame(e);e=requestAnimationFrame(function(){if(r){var D=z.touches?z.touches[0].clientX:z.clientX,I=z.touches?z.touches[0].clientY:z.clientY;D<u.left?D=u.left:D>u.right&&(D=u.right);I<u.top?I=u.top:I>u.bottom&&(I=u.bottom);var J="mousemove"===z.type?z.target:r.elementFromPoint(D,I);m.style.transform="translate("+(D-p-u.left)+"px,"+(I-q-u.top)+"px)";if(J&&J!==v&&J.classList.contains("tb_sort_fields_item")){const K=
I>h||D>k?"bottom":"top";if(g!==K||f!==J)v.style.display="none","bottom"===K?J.after(v):J.before(v),v.style.display="";f=J;g=K}h=I;k=D}})},C=function(z){r.body.classList.add("tb_start_animate","tb_move_drag");w=v.parentNode;w.classList.add("tb_sort_start");if("undefined"!==typeof tinyMCE){var D=w.getElementsByClassName("tb_lb_wp_editor");for(let I=D.length-1;-1<I;--I){let J=D[I].id;n[J]=tinymce.get(J).getContent();tinyMCE.execCommand("mceRemoveEditor",!1,J)}}m=v.cloneNode(!0);(D=m.getElementsByClassName("tb_sort_field_dropdown")[0])&&
D.remove();m.className+=" tb_sort_handler";v.classList.add("tb_current_sort");v.after(m);D=m.getBoundingClientRect();u=w.getBoundingClientRect();q=D.height/2-w.offsetTop;p=D.width/2-w.offsetLeft;x(z)};r.addEventListener(c.mouseup,function(z){this.removeEventListener(c.mousemove,C,{passive:!0,once:!0});this.removeEventListener(c.mousemove,x,{passive:!0});if(w){z.stopImmediatePropagation();e&&cancelAnimationFrame(e);m&&m.remove();if("undefined"!==typeof tinyMCE)for(let D in n)tinyMCE.execCommand("mceAddEditor",
!1,D),tinymce.get(D).setContent(n[D]);v.classList.remove("tb_current_sort");requestAnimationFrame(function(){b.control.preview(w,null,{repeat:!0});E.triggerEvent(w,"sortable");w.classList.remove("tb_sort_start");w=null})}this.body.classList.remove("tb_start_animate","tb_move_drag");f=m=g=h=k=n=r=q=p=u=v=e=null},{passive:!0,once:!0});r.addEventListener(c.mousemove,C,{passive:!0,once:!0});r.addEventListener(c.mousemove,x,{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=l.createElement("div");f.className="tb_sort_field_dropdown tb_sort_field_dropdown_"+e;var g=l.createElement("span");const h=d.dataset.id;g.className="tb_sort_field_dropdown_pointer";f.appendChild(g);g=null;let k=b.options[e].options;void 0===k&&(k=this.getDefaults(e,a),"text"!==e&&(k=k.concat(this.getGlobalOptions(a))));b.options[e].has_global_options&&
(k=k.concat(this.getGlobalOptions(a)));a.is_repeat=a.is_sort=!0;void 0!==c&&(b=d.dataset["new"]?!0:!1,e=this.find(c,!0===b?e:h,b),!1!==e&&void 0!==c[e].val&&(g=A.extend(!0,{},a.values),a.values=c[e].val));f.appendChild(a.create(k));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 h=function(k){1===k.which&&(k.target===d||d.contains(k.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(k.type,h,{passive:!0})))};H.document.addEventListener("mousedown",h,{passive:!0})}},remove(a,b){b=b.closest("li");const c=b.parentNode;b.parentNode.removeChild(b);a.control.preview(c,null,{repeat:!0});E.triggerEvent(c,"delete")},render(a,b){const c=this,d=l.createElement("div"),e=l.createElement("div"),f=l.createElement("div"),g=l.createElement("ul"),
h=l.createElement("ul"),k=b.values[a.id]?b.values[a.id].slice(0):[];d.className="tb_sort_fields_wrap tf_box tf_rel tf_w";h.className="tb_sort_fields_parent";!0===b.is_repeat?(h.dataset.inputId=a.id,h.className+=!0===b.is_sort?" tb_lb_sort_child":" tb_lb_option_child"):(h.id=a.id,h.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 m in a.options)g.appendChild(this.create(b,
a,m));for(let m=0,p=k.length;m<p;++m)!0===b.is_new&&!0!==k[m].show||h.appendChild(this.create(b,a,k[m].type,k[m].id,k,!0));g.addEventListener("click",function(m){"LI"===m.target.tagName&&(m.preventDefault(),m.stopPropagation(),t.Utils.hideOnClick(this),h.appendChild(c.create(b,a,m.target.dataset.type,null,k,!0)),b.control.preview(h,null,{repeat:!0}))});h.addEventListener("click",function(m){m.target.classList.contains("tb_sort_fields_remove")?(m.preventDefault(),m.stopPropagation(),c.remove(b,m.target)):
"LI"===m.target.tagName&&(m.preventDefault(),m.stopPropagation(),c.edit(b,a,k,m.target))});f.appendChild(e);f.appendChild(g);d.appendChild(h);d.appendChild(f);setTimeout(function(){c.sort(h,b)},800);!0===b.is_new&&b.afterRun.push(function(){b.control.preview(h,null,{repeat:!0})});return d}},multi:{render(a,b){const c=l.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=A(a),f=c.id,g=l.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.tfminicolors({opacity:void 0===c.opacity?!0:!!c.opacity,swatches:themifyColorManager.toColorsArray(),changeDelay:10,beforeShow(){const h=L.Lightbox.$lightbox,k=e.closest(".tfminicolors"),m=k.find(".tfminicolors-panel");m.css("visibility","hidden").show();k[0].classList.toggle("tfminicolors_right",h.offset().left+
h.width()<=m.offset().left+m.width());m.css("visibility","").hide();t.hasChanged=!0},show(){themifyColorManager.initColorPicker(this);"visual"===t.mode&&E.triggerEvent(this,"themify_builder_color_picker_show",{id:f})},hide(){g.style.display=""!==a.value?"block":"none";"visual"===t.mode&&E.triggerEvent(this,"themify_builder_color_picker_hide",{id:f})},change(h,k){h?k&&("0.99"==k?k=1:0>=parseFloat(k)&&(k=0)):k="";d.is_typing||k===l.activeElement||(b.value=k);h&&0>=parseFloat(A(this).tfminicolors("opacity"))&&
A(this).tfminicolors("opacity",0);"visual"===t.mode&&(h=h?0===h.indexOf("--")?"var("+h+")":A(this).tfminicolors("rgbaString"):"",E.triggerEvent(this,"themify_builder_color_picker_change",{id:f,val:h}))}}).tfminicolors("show");c=function(h){let k=parseFloat(this.value.trim().replace(",","."));if(1<k||isNaN(k)||""===k||0>k)k=a.value?1:"";"blur"===h.type&&(this.value=k);d.is_typing="keyup"===h.type;e.tfminicolors("opacity",k)};b.addEventListener("blur",c,{passive:!0});b.addEventListener("keyup",c,{passive:!0});
a.parentNode.appendChild(g);a.setAttribute("data-tfminicolors-initialized",!0)},setColor(a,b,c,d){let e=d,f="";""!==d&&0!==d.indexOf("--")&&(-1!==d.indexOf("_")?(t.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=c.getEl(a);null!==a&&(c=a.parentNode,void 0===b&&(b=""),this.setColor(a,c.getElementsByClassName("tfminicolors-swatch-color")[0],
c.nextElementSibling,b))},render(a,b){const c=l.createDocumentFragment(),d=l.createElement("div"),e=l.createElement("div"),f=l.createElement("input"),g=l.createElement("input"),h=l.createElement("span"),k=l.createElement("span"),m=this;let p=b.getStyleVal(a.id);d.className="tfminicolors_wrapper";e.className="tfminicolors tfminicolors-theme-default";f.type="text";f.className="tfminicolors-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");h.className="tfminicolors-swatch tfminicolors-sprite tfminicolors-input-swatch";k.className="tfminicolors-swatch-color tf_abs";g.type="text";g.className="color_opacity";h.appendChild(k);e.appendChild(f);e.appendChild(h);d.appendChild(e);d.appendChild(g);b.initControl(f,a);h.addEventListener("click",function(){d.insertAdjacentElement("afterbegin",f);e.parentNode.removeChild(e);m.controlChange(f,
g,a)},{once:!0,passive:!0});f.addEventListener("focusin",function(){h.click()},{once:!0,passive:!0});g.addEventListener("focusin",function(q){f.dataset.tfminicolorsInitialized?A(f).tfminicolors("show"):(f.dataset.opacity=this.value,h.click())},{passive:!0});!p&&a.default&&(p=a.default);void 0!==p&&this.setColor(f,k,g,p);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.hint(a.tooltip));
return c}},icon_color_bg:{render(a,b){a={"default":["#F7F7F7","#555"],black:["#000","#eee"],gray:["#989797","#eee"],blue:["#4d7de1","#edf3ff"],"light-blue":["#bdd9fd","#2a3e59"],green:["#4aab10","#e9ffdb"],"light-green":["#9bd611","#293807"],purple:["#7a6bf8","#eeedff"],"light-purple":["#c1bafd","#39355b"],brown:["#a35004","#ffeee0"],orange:["#ff9600","#fff2ea"],yellow:["#fff06c","#594718"],red:["#e8311f","#ffeeed"],pink:["#feb4e4","#441e32"],transparent:["",""],tb_default_color:["",""]};let c=b.getStyleVal("icon_color_bg");
return b.create([{type:"multi",label:"icon",options:[{id:"icon",type:"icon",class:"fullwidth"},{id:"bg",type:"color",default:c?a[c][0]:"",label:"bg"},{id:"c",type:"color",default:c?a[c][1]:"",label:"c"}],wrap_class:"tb_group_element_icon"}])}},tooltip:{render(a,b){a=b.create([{type:"group",label:b.label.t,display:"accordion",options:[{type:"textarea",label:b.label.tt,id:"_tooltip",class:"fullwidth",control:!1},{type:"color",label:b.label.bg_c,id:"_tooltip_bg",control:!1},{type:"color",label:b.label.f_c,
id:"_tooltip_c",control:!1},{type:"range",label:b.label.ma_wd,id:"_tooltip_w",control:!1,units:{px:{min:-2E3,max:2E3},em:{min:-20,max:20}}}]}]);"visual"===t.mode&&(a=this.bindEvents(a));return a},bindEvents(a){const b=this;var c=a.querySelector("#_tooltip");const d=[a.querySelector("#_tooltip_bg"),a.querySelector("#_tooltip_c")],e=["focus","keyup","blur","change"],f=a.querySelector("#_tooltip_w");for(let g=e.length-1;-1<g;--g)"change"!==e[g]&&c.addEventListener(e[g],h=>{b.addOrRemoveTooltip("blur"!==
h.type)},{passive:!0}),f.addEventListener(e[g],h=>{b.addOrRemoveTooltip("blur"!==h.type)},{passive:!0});for(c=d.length-1;-1<c;--c)d[c].addEventListener("themify_builder_color_picker_show",function(){b.addOrRemoveTooltip(!0);this.addEventListener("themify_builder_color_picker_hide",()=>{b.addOrRemoveTooltip(!1)},{once:!0,passive:!0})},{passive:!0}),d[c].addEventListener("themify_builder_color_picker_change",()=>{b.addOrRemoveTooltip(!0)},{passive:!0});return a},addOrRemoveTooltip(a){var b=t.liveStylingInstance.$liveStyledElmt[0];
let c=b.querySelector(":scope > .tf_tooltip");!a&&c?c.remove():(E.cssLazy.tf_tooltip||(E.cssLazy.tf_tooltip=!0,E.LoadCss(E.cssUrl+themify_vars.css_modules.t.u)),a=H.document.getElementById("_tooltip").value,""!==a?(c||(c=l.createElement("div"),c.className="tf_tooltip",b.appendChild(c)),b=H.document.getElementById("_tooltip_w").value,c.classList.add("tooltip_preview","tf_abs_c"),c.innerHTML=a,c.style.background=t.Utils.getColor(H.document.getElementById("_tooltip_bg")),c.style.color=t.Utils.getColor(H.document.getElementById("_tooltip_c")),
""!==b&&(b+=H.document.getElementById("_tooltip_w_unit").value),c.style.width=b,c.classList.remove("tf_hide")):c&&c.remove())}},text:{update(a,b,c){a=c.getEl(a);null!==a&&(a.value=void 0!==b?b:"")},render(a,b){const c=l.createDocumentFragment(),d=l.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 f in a.custom_args)d.setAttribute(f,a.custom_args[f]);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.hint(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=l.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";const d=!0===a.deg?b.range.render(a,b):b.text.render(a,b);c.appendChild(d);const e=
c.querySelector("#"+a.id);!0===a.deg&&(e.dataset.deg=!0);b.afterRun.push(function(){const f=t.Utils.getMouseEvents();e.addEventListener(f.mousedown,function(g){g.stopImmediatePropagation();let h=this.parentNode.querySelector(".tb_angle_circle");if(!h){let k=this.value;const m=l.createElement("div"),p=l.createElement("div");h=l.createElement("div");""!==k&&(m.style.transform="rotate("+k+"deg)");m.className="tb_angle_dot";h.className="tb_angle_circle";p.className="tb_angle_circle_wrapper";h.appendChild(m);
p.appendChild(h);this.parentNode.appendChild(p)}h.addEventListener(g.type,function(k){if("touchstart"===k.type||1===k.which){var m=this.getBoundingClientRect();let p=this.offsetWidth/2+m.left,q=this.offsetHeight/2+m.top,n;this.parentNode.querySelector(".tb_angle_circle_wrapper");let r=this.parentNode.querySelector(".tb_angle_dot");const v=180/Math.PI;m=this.ownerDocument;const u=function(x){x.stopImmediatePropagation();this.body.classList.add("tb_start_animate","tb_show_overlay");this.body.style.cursor=
"grab"},w=function(x){x.stopImmediatePropagation();n&&cancelAnimationFrame(n);n=requestAnimationFrame(function(){let C=Math.atan2(q-(x.touches?x.touches[0].clientY:x.clientY),p-(x.touches?x.touches[0].clientX:x.clientX))*v;C-=90;0>C&&(C+=360);C=Math.round(C);r.style.transform="rotate("+C+"deg)";e.value=C;E.triggerEvent(e,e.dataset.deg?"keyup":"change")})};m.addEventListener(f.mousemove,u,{passive:!0,once:!0});m.addEventListener(f.mousemove,w,{passive:!0});m.addEventListener(f.mouseup,function(x){n&&
cancelAnimationFrame(n);this.removeEventListener(f.mousemove,u,{passive:!0,once:!0});this.removeEventListener(f.mousemove,w,{passive:!0});this.body.classList.remove("tb_start_animate","tb_show_overlay");this.body.style.cursor="";requestAnimationFrame(function(){r=p=n=q=null})},{passive:!0,once:!0});w(k)}},{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=l.createElement("div");
c.autocomplete="off";e.className="tb_autocomplete_container";b.appendChild(e);c.addEventListener("input",function(){const f=this.nextElementSibling;for(f.style.display="none";null!==f.firstChild;)f.removeChild(f.lastChild);f.style.display="";const g=this.value,h=a.dataset,k=function(m){const p=l.createDocumentFragment();for(let q in m){let n=l.createElement("div");n.className="tb_autocomplete_item";n.setAttribute("data-value",q);n.innerText=m[q];p.appendChild(n)}f.classList.add("tf_scrollbar");f.appendChild(p)};
void 0===d.cache[h]&&(d.cache[h]={});if(void 0!==d.cache[h][g])k(d.cache[h][g]);else if(""!==g){null!==d.xhr&&d.xhr.abort();const m=this.parentNode;m.classList.add("tb_autocomplete_loading","tf_loader");d.xhr=A.ajax({type:"POST",url:themifyBuilder.ajaxurl,dataType:"json",data:{action:"tb_get_autocomplete",dataset:h,value:g,nonce:themifyBuilder.tb_load_nonce,pid:themifyBuilder.post_ID},success(p){p.success&&(d.cache[h][g]=p.data,k(p.data))},complete(){d.xhr=null;m.classList.remove("tb_autocomplete_loading",
"tf_loader")}})}},{passive:!0});e.addEventListener("mousedown",function(f){if(1===f.which&&f.target.classList.contains("tb_autocomplete_item")){f.preventDefault();f.stopPropagation();const g=this.previousElementSibling;g.value=f.target.getAttribute("data-value");g.blur();E.triggerEvent(g,"change")}});return b}},file:{_frames:{},clicked:null,browse(a,b,c,d){const e=this;a.addEventListener("click",function(f){f.preventDefault();f.stopPropagation();let g;void 0!==e._frames[d]?g=e._frames[d]:(g=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]=g);g.off("select").on("select",function(){t.ActionBar.disable=!0;const h=g.state().get("selection").first().toJSON();b.value=h.url;E.triggerEvent(b,"change");t.hasChanged=!0;A(b).trigger("change");const k=L.Lightbox.$lightbox.find("#"+b.id+"_id")[0];void 0!==k&&(k.value=h.id)});g.on("close",function(){t.ActionBar.disable=!0;setTimeout(function(){t.ActionBar.disable=null},5)});g.open()});
"image"===d&&b.addEventListener("change",function(f){t.hasChanged=!0;e.setImage(a,this.value.trim())},{passive:!0})},setImage(a,b){for(;a.firstChild;)a.removeChild(a.firstChild);if(b){const c=l.createElement("img");c.width=40;c.height=40;c.src=b;a.appendChild(c)}},update(a,b,c){a=c.getEl(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=l.createElement("div"),e=l.createElement("input"),f=l.createElement("a"),
g=l.createElement("span"),h=c.getStyleVal(b.id);let k;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",k=Math.random().toString(36).substr(2,7),e.dataset.inputId=b.id):(e.className+=" tb_lb_option",k=b.id);e.id=k;void 0!==h&&(e.value=h);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,h);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.hint(b.tooltip));if(null===this.clicked&&!0===c.is_new&&"setting"===c.clicked&&("image"===c.type||"pro-image"===c.type)){this.clicked=
!0;const m=this;c.afterRun.push(function(){f.click();m.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")),t.hasChanged=!0,E.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=L.Lightbox.$lightbox[0])));const c=a.parentNode.parentNode.getElementsByTagName("input"),d=a.value;a=b.getElementsByClassName("tb_group_element_"+d);for(let f=
c.length-1;-1<f;--f){var e=c[f].value;if(d!==e){e=b.getElementsByClassName("tb_group_element_"+e);for(let g=e.length-1;-1<g;--g)e[g].style.display="none"}}for(b=a.length-1;-1<b;--b)a[b].style.display="block"},update(a,b,c){c=c.getEl(a);if(null!==c){a=c.getElementsByTagName("input");const d=c.classList.contains("tb_icon_radio");let e=null;for(let f=a.length-1;-1<f;--f)if(a[f].value===b){e=a[f];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=c.getEl(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"):L.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 g=e.length-1;-1<g;--g)e[g].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=l.createDocumentFragment(),d=l.createElement("div");a="icon_radio"===a;const e=this.getOptions(b),f=this.getStyleVal(b.id),g=!0===b.option_js,h=[],k=this;let m=null,p=void 0!==b["default"]?b.default:!1,q;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",m=void 0===b.no_toggle);!0===this.is_repeat?
(d.className+=!0===this.is_sort?" tb_lb_sort_child":" tb_lb_option_child",q=Math.random().toString(36).substr(2,7),d.dataset.inputId=b.id):(d.className+=" tb_lb_option",d.id=q=b.id);!1!==p?d.dataset["default"]=p:!1===a&&void 0===f&&(p=e[0].value);void 0!==b.before&&c.appendChild(l.createTextNode(b.before));for(let r=0,v=e.length;r<v;++r){let u=l.createElement("label"),w=l.createElement("input");w.type="radio";w.name=q;w.value=e[r].value;!0===a&&w.setAttribute("data-value",e[r].value);!0===this.is_repeat&&
(w.className="tb_radio_dnd");void 0!==b["class"]&&(w.className+=!0===this.is_repeat?" "+b.class:b.class);!0===e[r].disable&&(w.disabled=!0);if(f===e[r].value||void 0===f&&p===e[r].value)w.checked=!0,!0===g&&h.push(w);u.appendChild(w);!0===g&&w.addEventListener("change",function(){this.parentNode.parentNode.blur();k.radio.controlChange(this)},{passive:!0});if(!0===a){if(void 0!==e[r].icon){var n=l.createElement("span");n.className="tb_icon_wrapper";n.innerHTML=e[r].icon;u.insertAdjacentElement("beforeend",
n)}void 0!==e[r].label_class&&(u.className+=e[r].label_class);void 0!==e[r].name&&(n=l.createElement("span"),n.className="themify_tooltip",n.textContent=e[r].name,u.appendChild(n))}else void 0!==e[r].name&&(n=l.createElement("span"),n.textContent=e[r].name,u.appendChild(n));d.appendChild(u);void 0!==b.new_line&&d.appendChild(l.createElement("br"));this.initControl(w,b)}d.addEventListener("click",function(r){"LABEL"===r.target.parentNode.tagName&&this.blur()},{passive:!0});c.appendChild(d);void 0!==
b.after&&c.appendChild(k.after(b));void 0!==b.description&&c.appendChild(k.description(b.description));!0===a&&!0===m&&k.icon_radio.controlChange(d);!0===g&&this.radioChange.push(function(){for(let r=0,v=h.length;r<v;++r)k.radio.controlChange(h[r])});return c},checkboxGenerate(a,b){const c=l.createDocumentFragment(),d=l.createElement("div"),e=this.getOptions(b);a="icon_checkbox"===a;const f=!0===b.option_js,g=void 0===b.new_line,h=this,k=[];let m=this.getStyleVal(b.id),p=null,q=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===m?void 0!==b["default"]&&(p=b["default"],q=Array.isArray(p)):!1!==m&&(m=m.split("|"));!0===a&&(d.className+=" tb_icon_checkbox");void 0!==b.before&&c.appendChild(l.createTextNode(b.before));
for(let n=0,r=e.length;n<r;++n){let v=l.createElement("label"),u=l.createElement("input");u.type="checkbox";u.className="tb-checkbox";u.value=e[n].name;void 0!==b["class"]&&(u.className+=" "+b.class);if(void 0!==m&&!1!==m&&-1!==m.indexOf(e[n].name)||p===e[n].name||!0===q&&-1!==p.indexOf(e[n].name))u.checked=!0;!0===f&&(u.addEventListener("change",function(){h.checkbox.controlChange(this)},{passive:!0}),k.push(u));"hide_anchor"===b.id&&t.Utils.changeOptions(u,"hide_anchor");!1===g&&(v.className="pad-right");
v.appendChild(u);if(!0===a){if(v.insertAdjacentHTML("beforeend",e[n].icon),void 0!==e[n].value){let w=l.createElement("span");w.className="themify_tooltip";w.textContent=e[n].value;v.appendChild(w)}}else void 0!==e[n].value&&v.appendChild(l.createTextNode(e[n].value));d.appendChild(v);void 0!==e[n].help&&d.appendChild(this.help(e[n].help));!0===g&&d.appendChild(l.createElement("br"));this.initControl(u,b)}"hide_anchor"===b.id&&d.addEventListener("click",function(n){n.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 n=0,r=k.length;n<r;++n)h.checkbox.controlChange(k[n])});return c},date:{loaded:null,render(a,b){const c=l.createDocumentFragment(),d=l.createElement("input"),e=l.createElement("button"),f=this,g=function(){return H.jQuery.fn.themifyDatetimepicker?
H.jQuery.fn.themifyDatetimepicker:H.jQuery.fn.datetimepicker},h=function(){g().call(A(d),"hide")},k=function(){const m=g();if(m){var p=void 0!==a.picker?a.picker:{};e.addEventListener("click",function(q){q.preventDefault();q.stopPropagation();d.value="";d.dispatchEvent(new Event("change"));this.style.display="none"});m.call(A(d),{showTimepicker:void 0===a.timepicker||a.timepicker?!0:!1,showButtonPanel:!0,changeYear:!0,dateFormat:p.dateformat||"yy-mm-dd",timeFormat:p.timeformat||"HH:mm:ss",stepMinute:p.stepMinute||
5,stepSecond:p.stepSecond||5,controlType:p.timecontrol||"select",oneLine:!0,separator:p.timeseparator||" ",onSelect(q){e.style.display=""===q?"none":"block";d.dispatchEvent(new Event("change"))},beforeShow(q,n){n.dpDiv.addClass("themify-datepicket-panel");let r=q.getBoundingClientRect();setTimeout(function(){n.dpDiv.css({top:r.top+q.offsetHeight,left:r.left})},10);"visual"===t.mode&&l.body.addEventListener("click",h,{once:!0})},onClose(){"visual"===t.mode&&l.body.removeEventListener("click",h)}})}};
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(){H.Themify.LoadCss(themifyBuilder.meta_url+"css/jquery-ui-timepicker.min.css",themify_vars.version);H.Themify.LoadAsync(themifyBuilder.includes_url+"js/jquery/ui/datepicker.min.js",function(){H.Themify.LoadAsync(themifyBuilder.meta_url+"js/jquery-ui-timepicker.min.js",function(){f.loaded=!0;setTimeout(k,10)},themify_vars.version,null,function(){return void 0!==
H.jQuery.fn.themifyDatetimepicker||void 0!==H.jQuery.fn.datetimepicker})},themify_vars.wp,null,function(){return void 0!==H.jQuery.fn.datepicker})}):b.afterRun.push(k);return c}},gradient:{controlChange(a,b,c,d,e,f,g,h,k){var m=a.getStyleVal(f.id);if(void 0===m||""===m)m=180;let p=!1,q=A(b),n=a.getStyleVal(c.id),r={angle:m,onChange(w,x){p&&(w=x="");"visual"===t.mode&&E.triggerEvent(c,"themify_builder_gradient_change",{val:x});c.value=w;t.hasChanged=!0},onInit(){b.style.display="block"}};n&&(r.gradient=
n,c.value=n);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);k||q.ThemifyGradient(r);const v=q.data("themifyGradient"),u=function(w){let x=f.parentNode;x.classList.contains("tb_angle_container")||(x=f);"radial"===w?(h.style.display=x.style.display="none",g.parentNode.style.display=""):(h.style.display=x.style.display="",g.parentNode.style.display="none")};t.Utils.getMouseEvents();k?(v.settings=A.extend({},v.settings,r),v.settings.type=m,
v.settings.circle=g.checked,v.isInit=!1,v.update(),v.isInit=!0):(d.addEventListener("click",function(w){w.preventDefault();w.stopImmediatePropagation();p=!0;v.settings.gradient=A.ThemifyGradient.default;v.update();p=!1}),e.addEventListener("change",function(w){w=this.value;v.setType(w);u(w)},{passive:!0}),g.addEventListener("change",function(){v.setRadialCircle(this.checked)},{passive:!0}),f.addEventListener("change",function(){let w=parseInt(this.value);w||(w=0);v.setAngle(w)},{passive:!0}));u(a.getStyleVal(e.id))},
update(a,b,c){var d=a+"-gradient";b=c.getEl(d);if(null!==b){const e=c.getEl(d+"-angle");d=c.getEl(d+"-type");a=c.getEl(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=l.createElement("div");var d=l.createElement("div");const e=l.createElement("select"),f=["linear","radial"],g=l.createElement("span"),h=l.createElement("div"),k=l.createElement("input"),m=l.createElement("a"),
p=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;h.className="tb_gradient_container";h.tabIndex=-1;k.type="hidden";k.className="themify-gradient tb_lb_option";k.dataset.id=a.id;k.id=a.id+"-gradient";m.className="tb_clear_gradient tf_close";var q=l.createElement("span");q.className="themify_tooltip";q.innerText=
b.label.clear_gradient;m.appendChild(q);m.href="#";for(q=0;2>q;++q){let r=l.createElement("option");r.value=f[q];r.textContent=b.label[f[q]];e.appendChild(r)}d.appendChild(e);c.appendChild(d);d=A.extend(!0,{},a);d.id=a.id+"-gradient-angle";const n=b.angle.render(d,b);c.appendChild(n);c.appendChild(g);c.appendChild(b.checkboxGenerate("checkbox",{id:a.id+"-circle-radial",options:[{name:"1",value:b.label.circle_radial}]}));c.appendChild(h);c.appendChild(k);c.appendChild(m);b.initControl(k,a);b.afterRun.push(function(){p.controlChange(b,
h,k,m,e,n.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=A.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 h=d.parentNode.closest(".tb_field");h.parentNode.insertBefore(f,h.nextElementSibling);h.parentNode.insertBefore(g,h.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=c.getEl(a);
if(null!==a){b=a.closest(".tb_tab");a=b.getElementsByClassName("tb_image_options");b=b.getElementsByClassName("tb_gradient_image_color")[0].getElementsByClassName("tfminicolors-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=l.createElement("div"),d=l.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=A.extend(!0,{},a);e.type="image";e.class="xlarge";d.appendChild(b.file.render("image",A.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 f={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;f.options.push(A.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;f.options.push(A.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;f.options.push(A.extend({},e));const g=d.parentNode.closest(".tb_field");g.parentNode.insertBefore(b.create([f]),g.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 c=this.getElementsByClassName("tfl-icon");for(let d=c.length-1;-1<d;--d)c[d].classList.remove("selected");b.classList.add("selected");t.hasChanged=!0;E.triggerEvent(this,"change",{val:b.id})}})},update(a,b,c){c=c.getEl(a);if(null!==c){a=c.getElementsByClassName("tfl-icon");for(let d=a.length-1;-1<d;--d)a[d].classList.toggle("selected",
b===a[d].id);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=l.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 f=0,g=d.length;f<g;++f){let h=l.createElement("a"),k=l.createElement("span"),m;h.href="#";h.className="tfl-icon";h.id=d[f].value;e===d[f].value.toString()&&(h.className+=" selected");k.className="themify_tooltip";k.textContent=d[f].label;"sprite"===a.mode&&-1===d[f].img.indexOf(".png")?(m=l.createElement("span"),
m.className="tb_sprite",-1!==d[f].img.indexOf("http")?m.style.backgroundImage="url("+d[f].img+")":m.className+=" tb_"+d[f].img):(m=l.createElement("img"),m.alt=d[f].label,m.src=-1!==d[f].img.indexOf("http")?d[f].img:themifyBuilder.builder_url+"/editor/img/"+d[f].img);h.appendChild(m);h.appendChild(k);c.appendChild(h)}this.controlChange(c);"row"!==b.component||"row_width"!==a.id&&"row_height"!==a.id?b.initControl(c,a):t.Utils.changeOptions(c,a.type);return c}},layoutPart:{data:[],get(a){const b=this;
A.ajax({type:"POST",url:themifyBuilder.ajaxurl,dataType:"json",data:{action:"tb_get_library_items",nonce:themifyBuilder.tb_load_nonce,pid:themifyBuilder.post_ID},beforeSend(c){L.showLoader("show")},success(c){L.showLoader("hide");b.data=c;a()},error(){L.showLoader("error")}})},render(a,b){function c(){const m=b.values[a.id],p=null!==t.Forms.LayoutPart.id?t.Forms.LayoutPart.id.toString():null;k.appendChild(l.createElement("option"));for(let q=0,n=d.data.length;q<n;++q)if(p!==d.data[q].id.toString()){let r=
l.createElement("option");r.value=d.data[q].post_name;r.textContent=d.data[q].post_title;m===d.data[q].post_name&&(r.selected=!0);k.appendChild(r)}}const d=this,e=l.createDocumentFragment(),f=b.select.render(a,b),g=l.createElement("a"),h=l.createElement("a"),k=f.querySelector("select");0===d.data.length?d.get(c):c();e.appendChild(f);g.target=h.target="_blank";g.className="tb_icon_btn";g.href=a.edit_url;h.href=a.add_url;h.className="add_new tf_plus_icon tb_icon_btn";g.appendChild(t.Utils.getIcon("ti-folder"));
g.appendChild(l.createTextNode(b.label.mlayout));h.appendChild(l.createTextNode(b.label.nlayout));e.appendChild(l.createElement("br"));e.appendChild(h);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?l.createElement("div"):l.createDocumentFragment();const d=l.createElement("h4");d.textContent=c;b.appendChild(l.createElement("hr"));b.appendChild(d)}else void 0!==a.html?(b=l.createElement("div"),b.innerHTML=
a.html,b=b.firstChild):b=l.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 f=0;7>f;++f)c[f]=0===f?"":f;a.options=c;a=A.extend(!0,{},a);a.type="select";a=b.select.render(a,b);const e=a.querySelector("select");b.afterRun.push(function(){const f=e.closest(".tb_field");f.parentNode.insertBefore(b.create(d),f.nextElementSibling)});return a}},expand:{render(a,b){const c=l.createElement("fieldset"),
d=l.createElement("div"),e=l.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(l.createTextNode(f));e.appendChild(t.Utils.getIcon("ti-angle-up"));c.appendChild(e);c.appendChild(d);e.addEventListener("click",function(g){g.preventDefault();g.stopImmediatePropagation();void 0===this.dataset.done&&(this.dataset.done=!0,d.appendChild(b.create(a.options)),"setting"===
b.clicked&&b.setUpEditors(),b.callbacks(),E.body.triggerHandler("tb_options_expand",[d]));this.classList.toggle("tb_closed")});return c}},gallery:{file_frame:null,cache:{},init(a,b){const c=function(h){h.preventDefault();h.stopPropagation();null===e.file_frame?(e.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}),e.file_frame.el.classList.add("themify_gallery_settings")):
e.file_frame.options.selection.reset();wp.media.gallery.shortcode=function(k){const m=k.props.toJSON(),p=_.pick(m,"orderby","order");k.gallery&&Object.assign(p,k.gallery.toJSON());p.ids=k.pluck("id");m.uploadedTo&&(p.id=m.uploadedTo);p._orderbyRandom&&(p.orderby="rand",delete p._orderbyRandom);p.ids&&"post__in"===p.orderby&&delete p.orderby;for(let q in wp.media.gallery.defaults)wp.media.gallery.defaults[q]===p[q]&&delete p[q];delete p._orderByField;k=new H.wp.shortcode({tag:"gallery",attrs:p,type:"single"});
wp.media.gallery.shortcode=d;return k};h=b.value.trim();0<h.length?(e.file_frame=wp.media.gallery.edit(h),e.file_frame.state("gallery-edit")):(e.file_frame.state("gallery-library"),e.file_frame.open(),e.file_frame.$el.find(".media-menu .media-menu-item").last().trigger("click"));h=function(k){const m=wp.media.gallery.shortcode(k).string().slice(1,-1);b.value="["+m+"]";g(k.models);E.triggerEvent(b,"change");t.hasChanged=!0};e.file_frame.off("update",h).on("update",h)};a.addEventListener("click",c);
const d=wp.media.gallery.shortcode,e=this,f=b.value.trim(),g=function(h,k){const m=l.createElement("div");var p=b.parentNode.getElementsByClassName("tb_shortcode_preview")[0];m.className="tb_shortcode_preview";void 0!==p&&p.parentNode.removeChild(p);for(let q=0,n=h.length;q<n;++q){p=l.createElement("img");p.width=p.height=50;if(!0===k)p.src=h[q];else{let r=h[q].attributes;p.src=r.sizes.thumbnail?r.sizes.thumbnail.url:r.url}m.appendChild(p)}m.addEventListener("click",c);b.parentNode.insertBefore(m,
b.nextElementSibling)};0<f.length&&(void 0!==this.cache[f]?g(this.cache[f],!0):A.ajax({type:"POST",url:themifyBuilder.ajaxurl,dataType:"json",data:{action:"tb_load_shortcode_preview",tb_load_nonce:themifyBuilder.tb_load_nonce,shortcode:f},success(h){g(h,!0);e.cache[f]=h}}))},render(a,b){const c=l.createDocumentFragment(),d=l.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=l.createDocumentFragment(),d=l.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);void 0!==a.readonly&&a.readonly&&d.setAttribute("readonly",1);c.appendChild(b.initControl(d,a));void 0!==a.codeeditor&&b.afterRun.push(function(){b.code_editor.load(function(){var f=themifyBuilder.c_e.config;f.codemirror.mode=a.codeeditor;f.codemirror.lineNumbers=!1;f=H.wp.codeEditor.initialize(d,f);b.code_editor.setHeight(f.codemirror.display.wrapper,"m");f.codemirror.on("change",function(g){d.value=g.getValue();E.triggerEvent(d,
"keyup")})})});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=l.createElement("div"),d=l.createElement("div"),e=l.createElement("div"),f=l.createElement("button"),g=l.createElement("span"),h=l.createElement("div"),k=l.createElement("button"),m=l.createElement("button"),p=l.createElement("div"),q=l.createElement("div"),n=l.createElement("textarea");
let r;c.className="wp-core-ui wp-editor-wrap tmce-active";n.className="tb_lb_wp_editor fullwidth";!0===b.is_repeat?(r=Math.random().toString(36).substr(2,7),n.className+=!0===b.is_sort?" tb_lb_sort_child":" tb_lb_option_child",n.dataset.inputId=a.id,!1!==a.control&&(void 0===a.control&&(a.control={}),a.control.repeat=!0)):(n.className+=" tb_lb_option",r=a.id);n.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";h.className="wp-editor-tabs";k.type="button";k.className="wp-switch-editor switch-tmce";k.id=r+"-tmce";k.dataset.wpEditorId=r;k.textContent=b.label.visual;m.type="button";m.className="wp-switch-editor switch-html";m.id=r+"-html";m.dataset.wpEditorId=r;m.textContent=b.label.text;p.id="wp-"+r+"-editor-container";p.className="wp-editor-container";q.id="qt_"+r+"_toolbar";q.className="quicktags-toolbar";void 0!==
a["class"]&&(n.className+=" "+a.class);void 0!==b.values[a.id]&&(n.value=b.values[a.id]);n.rows=12;n.cols=40;p.appendChild(n);p.appendChild(q);h.appendChild(k);h.appendChild(m);f.appendChild(g);f.appendChild(l.createTextNode(b.label.add_media));e.appendChild(f);d.appendChild(e);d.appendChild(h);c.appendChild(d);c.appendChild(p);b.editors.push({el:n,data:a});return c}},select:{dataset_cache:{},update(a,b,c){a=c.getEl(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=l.createDocumentFragment();c=c.getOptions(a);for(let e in c){let f=l.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=l.createElement("div"),e=l.createElement("select"),f=l.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);e.className+=" tf_scrollbar";void 0!==a["class"]&&(e.className+=" "+a.class);const h=function(k){if(k.optgroup){k=b.getOptions(k);for(let m in k)if(void 0!==k[m].label){let p=l.createElement("optgroup");p.setAttribute("label",k[m].label);p.appendChild(c.make_options(k[m],g,b));e.appendChild(p)}else e.appendChild(c.make_options(k[m],
g,b))}else e.appendChild(c.make_options(k,g,b))};void 0!==a.dataset?void 0!==c.dataset_cache[a.dataset]?h(c.dataset_cache[a.dataset]):A.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(k){L.showLoader("show")},success(k){k.success&&(L.showLoader("hide"),c.dataset_cache[a.dataset]=k.data,h(k.data))},error(){L.showLoader("error")}}):h(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.hint(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=this[d][a]&&this[d][a].v?this[d][a].v:null;if(e&&0!==e.length){c=c.getStyleVal(b.id);void 0===c&&(c="google"===d?"regular":
"normal");for(b.dataset.selected=a;null!==b.firstChild;)b.removeChild(b.lastChild);b.closest(".tb_field").classList.remove("_tb_hide_binding");for(let f=0,g=e.length;f<g;++f)a=l.createElement("option"),a.value=a.textContent=e[f],e[f]===c&&(a.selected=!0),b.appendChild(a)}else b.closest(".tb_field").classList.add("_tb_hide_binding")}},loadGoogleFonts(a){a=A.unique(a.split("|"));var b={google:[],cf:[]};const c=[],d=this,e=function(){for(let h=c.length-1;-1<h;--h)-1===d.loaded_fonts.indexOf(c[h])&&d.loaded_fonts.push(c[h]);
E.body.triggerHandler("tb_font_stylesheet_loaded",[d,c])};for(let h=a.length-1;-1<h;--h)if(a[h]&&-1===this.loaded_fonts.indexOf(a[h])&&(-1===b.google.indexOf(a[h])||-1===b.cf.indexOf(a[h]))){var f=a[h].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&&(a=window.location.protocol+
"//fonts.googleapis.com/css?family="+encodeURI(b.google.join("|"))+"&display=swap",E.LoadCss(a,!1,null,null,e),"visual"===t.mode&&H.Themify.LoadCss(a,!1));0<b.cf.length&&(b=themifyBuilder.cf_api_url+encodeURI(b.cf.join("|")),E.LoadCss(b,!1,null,null,e),"visual"===t.mode&&H.Themify.LoadCss(b,!1))},controlChange(a,b,c,d){const e=this,f=A(a).comboSelect({comboClass:"themify-combo-select",comboArrowClass:"themify-combo-arrow",comboDropDownClass:"themify-combo-dropdown tf_scrollbar",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(g){g=g.target;if(g.classList.contains("themify-combo-item")){t.hasChanged=!0;g=g.dataset.value;const h=a.closest(".tb_tab");let k=this.querySelector('option[value="'+g+'"]');k&&(k=k.dataset.type);"webfont"!==k&&g&&-1===e.loaded_fonts.indexOf(g)&&e.loadGoogleFonts(g);h&&e.updateFontVariant(g,h.getElementsByClassName("font-weight-select")[0],
d,k);setTimeout(function(){E.triggerEvent(a,"change")},10)}},{passive:!0});f[0].addEventListener("mouseover",function(g){g=g.target;if(g.classList.contains("themify-combo-item")){let h=g.dataset.value;if(h&&A(g).is(":visible")&&("default"===h&&(h="inherit"),b.style.top=g.offsetTop-g.parentNode.scrollTop+30+"px",b.style.fontFamily=h,b.style.display="block","inherit"!==h&&!g.classList.contains("tb_font_loaded"))){g.classList.add("tb_font_loaded");const k=g.ownerDocument===H.document?"top":"bottom";
void 0===e.fonts[k]&&(e.fonts[k]=[]);if(-1===e.fonts[k].indexOf(h)){const m=function(q){e.fonts[k].push(q);c.classList.remove("themify_show_wait")};let p=this.querySelector('option[value="'+h+'"]');p&&(p=p.dataset.type);if(p&&"webfont"!==p){let q="";"google"===p?q=window.location.protocol+"//fonts.googleapis.com/css?family="+encodeURI(h)+"&display=swap":"cf"===p&&(q=themifyBuilder.cf_api_url+encodeURI(h));""!==q&&(c.classList.add("themify_show_wait"),("top"===k?H.Themify:E).LoadCss(q,!1,null,null,
m))}else m(h)}g.style.fontFamily=h}}},{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=c.getEl(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=
l.createElement("option");c[0].firstChild;)c[0].removeChild(c[0].lastChild);for(;c[1].firstChild;)c[1].removeChild(c[1].lastChild);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=
l.createElement("div"),d=l.createElement("select"),e=l.createElement("span"),f=l.createElement("span"),g=l.createDocumentFragment();var h=l.createElement("option");const k=b.getStyleVal(a.id),m=this,p={safe:b.label.safe_fonts,google:b.label.google_fonts},q=1>Object.keys(this.cf).length;!1===q&&(p.cf=b.label.cf_fonts);c.className="tb_font_preview_wrapper";d.className="tb_lb_option font-family-select tf_scrollbar";d.id=a.id;e.className="tb_font_preview";f.textContent=b.label.font_preview;h.value="";
h.textContent="---";g.appendChild(h);void 0!==a["class"]&&(d.className+=" "+a.class);h=["google","safe"];!1===q&&h.push("cf");for(let r=h.length-1;-1<r;--r){let v=l.createElement("optgroup");v.label=p[h[r]];if(void 0!==k){let u=l.createElement("option");u.value=k;u.selected=!0;u.textContent="cf"===h[r]&&void 0!==this.cf[k]?this.cf[k].n:"safe"===h[r]&&void 0!==this.safe[k]?this.safe[k]:"google"===h[r]&&void 0!==this.google[k]?this.google[k].n:void 0!==this.cf[k]?this.cf[k].n:k;v.appendChild(u)}g.appendChild(v)}const n=
function(){this.removeEventListener("focusin",n,{once:!0,passive:!0});this.removeEventListener("tf_init",n,{once:!0,passive:!0});var r=m.safe,v=l.createDocumentFragment();const u=this.querySelector("select"),w=u.getElementsByTagName("optgroup");u.dataset.init=!0;if(void 0!==k)for(var x=w.length-1;-1<x;--x)for(;w[x].firstChild;)w[x].removeChild(w[x].lastChild);for(var C in r)x=l.createElement("option"),x.value=C,x.textContent=r[C],x.dataset.type="webfont",k===C&&(x.selected=!0),v.appendChild(x);w[q?
0:1].appendChild(v);r=["google"];!1===q&&r.unshift("cf");for(v=r.length-1;-1<v;--v){C=m[r[v]];x=l.createDocumentFragment();for(let z in C){let D=l.createElement("option");D.value=z;D.dataset.type=r[v];D.textContent=C[z].n;k===z&&(D.selected=!0);x.appendChild(D)}w["cf"===r[v]?0:q?1:2].appendChild(x)}m.controlChange(u,e,f,b)};c.addEventListener("focusin",n,{once:!0,passive:!0});c.addEventListener("tf_init",n,{once:!0,passive:!0});d.appendChild(g);e.appendChild(f);c.appendChild(b.initControl(d,a));c.appendChild(e);
b.afterRun.push(function(){const r=b.create([{type:"select",label:"f_w",selector:a.selector,class:"font-weight-select",id:a.id+"_w",prop:"font-weight"}]),v=c.closest(".tb_field"),u=r.querySelector(".tb_field");v.parentNode.insertBefore(r,v.nextElementSibling);m.updateFontVariant(k,u.querySelector(".font-weight-select"),b)});return c}},animation_select:{render(a,b){const c=l.createElement("div"),d=b.static.preset_animation,e=l.createElement("select");b=b.values[a.id];c.className="selectwrapper";e.className=
"tb_lb_option tf_scrollbar";e.id=a.id;e.appendChild(l.createElement("option"));for(let f in d){a=l.createElement("optgroup");a.label=f;for(let g in d[f]){let h=l.createElement("option");h.value=g;h.text=d[f][g];b===g&&(h.selected=!0);a.appendChild(h)}e.appendChild(a)}c.appendChild(e);return c}},select_menu:{data:null,get(a,b){const c=this,d=function(){for(let e in c.data){let f=l.createElement("option");f.value=c.data[e].slug;f.text=c.data[e].name;f.dataset.termid=c.data[e].term_id||"";b===c.data[e].slug&&
(f.selected=!0);a.appendChild(f)}};null===c.data?A.ajax({type:"POST",url:themifyBuilder.ajaxurl,dataType:"json",data:{action:"tb_get_menu",tb_load_nonce:themifyBuilder.tb_load_nonce},success(e){c.data=e;d()}}):d()},render(a,b){const c=l.createDocumentFragment(),d=l.createElement("div"),e=l.createElement("select"),f=l.createElement("small"),g=b.values[a.id];d.className="selectwrapper";e.className="select_menu_field 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.innerHTML=b.label.menu_help;this.get(e,g);d.appendChild(b.initControl(e,a));c.appendChild(d);c.appendChild(l.createElement("br"));c.appendChild(f);return c}},sticky:{render(a,b){const c={},d=t.activeModel.get("element_id"),e=A.extend(!0,{},a);a=a.key;const f=t.Models.Registry.items;for(let g in f){let h=f[g].attributes;if(a===h.elType&&h.element_id!==d){let k="row"===a?h.styling:h.mod_settings;
c[h.element_id]="row"===a&&k&&(k.custom_css_id||k.row_anchor)?k.custom_css_id?"#"+k.custom_css_id:"#"+k.row_anchor:"module"===a&&k&&k.custom_css_id?"#"+k.custom_css_id:"row"===a?"Row #"+h.element_id:h.mod_name+" #"+h.element_id}}e.options=c;return b.select.render(e,b)}},selectSearch:{update(a,b,c,d){d=l.createDocumentFragment();let e=null;b.removeAttribute("data-value");b.value="";if(void 0!==c){for(let f in c){let g=l.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(c){c=b.getElementsByClassName("tb_search_item");const d=this.value.trim(),e=new RegExp(d,"i");for(let f=0,g=c.length;f<g;++f)c[f].style.display=""===d||e.test(c[f].textContent)?"block":"none"},{passive:!0});b.addEventListener("mousedown",function(c){if(1===c.which&&
c.target.classList.contains("tb_search_item")){c.preventDefault();c.stopPropagation();var d=this.getElementsByClassName("tb_search_item");c=c.target;for(let e=d.length-1;-1<e;--e)d[e].classList.remove("selected");c.classList.add("selected");d=c.dataset.value;a.value=c.textContent;a.dataset.value=d;a.blur();a.previousElementSibling.blur();E.triggerEvent(a,"selectElement",{val:d})}})},render(a,b){const c=l.createElement("div"),d=l.createElement("div"),e=l.createElement("input"),f=l.createElement("span"),
g=l.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.hint(a.tooltip));this.events(e,g);return c}},optin_provider:{cache:null,render(a,b){const c=l.createElement("div"),d=this;null===this.cache?(L.showLoader("show"),A.ajax({type:"POST",url:themifyBuilder.ajaxurl,
dataType:"json",data:{action:"tb_optin_get_settings",tb_load_nonce:themifyBuilder.tb_load_nonce},success:function(e){L.showLoader("spinhide");d.cache=e;c.appendChild(b.create(d.cache));b.callbacks()},error(){L.showLoader("error")}})):c.appendChild(b.create(d.cache));return c}},check_map_api:{render(a,b){return themifyBuilder[a.map+"_api"]?l.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,h=b.values,k=function(q){const n=[];for(let r in q)n[r]=q[r].name;return n},m=function(q,n,r){const v=q.nextElementSibling;for(;v.firstChild;)v.removeChild(v.lastChild);v.appendChild(b.selectSearch.update(n,q,r,b))},p=function(q,n,r,v){q.classList.add("tb_search_wait");d&&d.abort();return d=A.ajax({type:"POST",url:themifyBuilder.ajaxurl,dataType:"json",data:{action:"tb_get_post_types",tb_load_nonce:themifyBuilder.tb_load_nonce,
type:r,v:n,s:v?v:"",all:a.all,just_current:a.just_current,id:themifyBuilder.post_ID},complete(){q.classList.remove("tb_search_wait")}})};(function(){let q=A.extend(!0,{},a),n=null;c=l.createElement("div");c.id=a.id?a.id:a.term_id;b.afterRun.push(function(){let r=["id","tax_id","term_id","tag_id"],v=l.createDocumentFragment(),u=null,w=function(z,D,I){const J=I?D+"_"+I:D,K=function(B){if(void 0!==a.term_id||void 0!==a.tag_id){if(a.all){var y=z.closest("."+a.id),F="All"===y.querySelector("#"+a.id).value;
y=y.querySelectorAll("."+a.tax_id+",."+a.term_id+",."+a.tag_id);for(var G=y.length-1;-1<G;--G)y[G].classList.toggle("tf_hide",F)}y=void 0===a.tag_id?a.term_id.replace("#tmp_id#",D):a.tag_id;F=z.closest(".tb_input");var M;z.id=y;null===u&&void 0!==h[y]&&(M=h[y].split("|")[0]);M||(M=0);m(z,M,e.cacheTerms[B]);if(I||""===I)z.value=I;if(null===u){B=l.createElement("input");y=l.createElement("span");G=l.createElement("div");y.innerHTML=b.label.or;B.type="text";B.className="query_category_multiple";G.className=
"tb_query_multiple_wrap";G.appendChild(y);G.appendChild(B);F.insertBefore(G,F.nextSibling);void 0!==g&&F.appendChild(b.after(g));void 0!==f&&F.appendChild(b.description(f));if(void 0!==a.slug_id){y=F.parentNode;G=b.create([{type:"radio",id:"term_type",label:b.label.query_by,default:void 0===h.term_type&&"post_slug"===h[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 N=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}]);y.parentNode.insertBefore(G,y);y.parentNode.appendChild(N)}void 0!==a.sticky_id&&(y=b.create([{type:"toggle_switch",label:b.label.sticky_first,id:a.sticky_id,options:"simple",wrap_class:"tb_group_element_all"}]),F.parentNode.parentNode.appendChild(y));B.addEventListener("change",function(N){E.triggerEvent(z,"queryPosts",{val:M})},{passive:!0});null!==
n&&clearTimeout(n);n=setTimeout(function(){b.callbacks()},2)}F.getElementsByClassName("query_category_multiple")[0].value=M;!0===u||b.is_new?E.triggerEvent(z,"queryPosts",{val:M}):ThemifyConstructor.settings=t.Utils.clear(t.Forms.serialize("tb_options_setting"));u=!0}};void 0===e.cacheTerms[J]?p(z.parentNode,D,"terms",I).done(function(B){e.cacheTerms[J]=B;K(J)}):K(J)};for(let z=0,D=r.length;z<D;++z){if(!q[r[z]])continue;q.id=q[r[z]];var x=void 0;q.label=(null==(x=a.labels)?0:x[r[z]])?a.labels[r[z]]:
b.label["query_"+r[z]];q.type="selectSearch";"term_id"===r[z]?(q.wrap_class="tb_search_term_wrap tb_group_element_category",q.class="query_category_single",q.help=b.label.query_desc,q.control={control_type:"queryPosts"}):"tax_id"!==r[z]&&"tag_id"!==r[z]||void 0!==q.term_id||(q.control={control_type:"queryPosts"});delete q.description;delete q.after;let I=b.create([q]);!0===a.just_current&&delete q.wrap_class;(function(){let J="id"===r[z],K="term_id"===r[z]||"tag_id"===r[z],B=K?"":h[q.id],y=I.querySelector(".tb_search_input");
y.addEventListener("selectElement",function(F){let G=F.detail.val,M=this.closest(".tb_field");K?(M.getElementsByClassName("query_category_multiple")[0].value=G,E.triggerEvent(this,"queryPosts",{val:G})):null!==M.nextElementSibling?(M=M.nextElementSibling,J||!0!==u||void 0===a.slug_id||(M=M.nextElementSibling),null!==M&&(M=M.getElementsByClassName("tb_search_input")[0],J?void 0!==e.cacheTypes[G]&&(!0===a.just_current&&"tag"===h[a.tax_id]&&(h[a.tax_id]="post_tag"),m(M,h[a.tax_id],k(e.cacheTypes[G].options)),
E.triggerEvent(M,"selectElement",{val:M.getAttribute("data-value")})):(w(M,G),M.addEventListener("keyup",function(N){(48<=N.keyCode&&57>=N.keyCode||65<=N.keyCode&&90>=N.keyCode||8===N.keyCode||229===N.keyCode)&&setTimeout(function(){w(M,G,this.value.trim())}.bind(this),500)},{passive:!0})))):J||E.triggerEvent(this,"queryPosts",{val:this.getAttribute("data-value")})},{passive:!0});if(J){const F=function(){B||(B="post");m(y,B,k(e.cacheTypes));E.triggerEvent(y,"selectElement",{val:B});y=null};null===
e.cacheTypes?p(y.parentNode,null,"post_types").done(function(G){e.cacheTypes=G;!0===a.just_current&&void 0==B&&(B=Object.keys(G));F()}):setTimeout(F,10)}else K&&!a.id&&void 0!==a.taxonomy&&(w(y,a.taxonomy),y.addEventListener("input",function(F){(48<=F.keyCode&&57>=F.keyCode||65<=F.keyCode&&90>=F.keyCode||8===F.keyCode||229===F.keyCode)&&setTimeout(function(){w(y,a.taxonomy,this.value.trim())}.bind(this),500)},{passive:!0}))})();v.appendChild(I)}if(q.query_filter&&(x=b.create([{type:"multi",label:b.label.aq[0],
id:"query_date",options:[{id:"query_date_from",label:b.label.aq[1],type:"date",timepicker:!1},{id:"query_date_to",label:b.label.aq[2],type:"date",timepicker:!1}],wrap_class:"tb_query_filter"+(b.values.query_date_from||b.values.query_date_to?"":" tf_hide")},{type:"autocomplete",dataset:"authors",id:"query_authors",label:b.label.aq[7],wrap_class:"tb_query_filter"+(b.values.query_authors?"":" tf_hide"),help:b.label.aq[9]},{type:"multi",label:b.label.aq[3],id:"query_cf",options:[{type:"autocomplete",
dataset:"custom_fields",id:"query_cf_key",label:b.label.aq[4]},{id:"query_cf_value",label:b.label.aq[5],type:"text"},{id:"query_cf_c",label:b.label.aq[6],type:"select",options:{"":"LIKE","NOT LIKE":"NOT LIKE","NOT EXISTS":"NOT EXISTS","=":"=","!=":"!=",">":">",">=":">=","<":"<","<=":"<="}}],wrap_class:"tb_query_filter"+(b.values.query_cf_key?"":" tf_hide")}]),v.appendChild(x),!b.values.query_cf_key||!b.values.query_authors||!b.values.query_date_from&&!b.values.query_date_to)){let z=l.createElement("div");
x=l.createElement("div");let D=l.createElement("div"),I=l.createElement("ul"),J=l.createElement("div"),K=l.createElement("span");if(!b.values.query_date_from&&!b.values.query_date_to){var C=l.createElement("li");C.innerText=b.label.aq[0];C.setAttribute("data-id","query_date");I.appendChild(C)}b.values.query_authors||(C=l.createElement("li"),C.innerText=b.label.aq[7],C.setAttribute("data-id","query_authors"),I.appendChild(C));b.values.query_cf_key||(C=l.createElement("li"),C.innerText=b.label.aq[3],
C.setAttribute("data-id","query_cf"),I.appendChild(C));z.className="tb_field";x.className="tb_input tf_rel";J.className="tb_label tb_empty_label";D.setAttribute("tabindex","-1");D.className="tb_ui_dropdown_label tb_sort_fields_plus";I.className="tb_ui_dropdown_items";K.innerText=b.label.aq[8];D.appendChild(K);z.appendChild(J);z.appendChild(x);x.appendChild(D);x.appendChild(I);v.appendChild(z);I.addEventListener("click",function(B){if("LI"===B.target.tagName){B.preventDefault();B.stopPropagation();
t.Utils.hideOnClick(this);let y=B.target.getAttribute("data-id");this.closest('.tb_field[data-type="query_posts"], .tb_field[data-type="advanced_posts_query"]').querySelector("."+y).classList.remove("tf_hide");B.target.style.display="none";B.target.removeAttribute("data-id");this.querySelector("[data-id]")||z.classList.add("tf_hide")}})}c.parentNode.replaceChild(v,c);q=c=null})})();return c}},hook_content:{render(a,b){return b.create([{type:"group",label:b.label.hc[0],display:"accordion",options:[{id:"hook_content",
type:"builder",options:[{type:"select",id:"h",options:a.options,after:b.label.hc[1]},{type:"textarea",id:"c",wrap_class:"tb_disable_dc",class:"fullwidth"}]}]}])}},position_box:{w:null,h:null,update(a,b,c){c=L.Lightbox.$lightbox[0].querySelector("#"+a);null===c&&(c=L.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);E.triggerEvent(d,
"change")},render:function(a,b){const c=this,d=this.getPreDefinedPositions(),e=t.Utils.getMouseEvents(),f=b.getStyleVal(a.id),g=l.createElement("div"),h=l.createElement("div"),k=l.createElement("div"),m=l.createElement("div"),p=l.createElement("div"),q=b.hidden.render(a,b);g.className="tb_position_box_wrapper";h.className="tb_position_box_container";k.className="tb_position_box";m.className="tb_position_box_handle";p.className="tb_position_box_label";for(let n in d){let r=l.createElement("div"),v=
l.createElement("span"),u=l.createElement("span"),w=d[n].split(",");v.className="themify_tooltip";u.textContent=n.replace("-"," ");r.className="tb_position_item";r.setAttribute("data-pos",d[n]);r.style.left=w[0]+"%";r.style.top=w[1]+"%";v.appendChild(u);r.appendChild(v);k.appendChild(r)}m.addEventListener(e.mousedown,function(n){if("touchstart"===n.type||1===n.which){n.stopImmediatePropagation();let r,v;const u=this.ownerDocument,w=this,x=this.offsetLeft-(n.touches?n.touches[0].clientX:n.clientX),
C=this.offsetTop-(n.touches?n.touches[0].clientY:n.clientY),z=c.w,D=c.h,I=function(K){v=!0;u.body.classList.add("tb_start_animate","tb_move_drag")},J=function(K){K.stopImmediatePropagation();r&&cancelAnimationFrame(r);r=requestAnimationFrame(function(){let B=x+(K.touches?K.touches[0].clientX:K.clientX),y=C+(K.touches?K.touches[0].clientY:K.clientY);B>z?B=z:0>B&&(B=0);y>D?y=D:0>y&&(y=0);w.style.left=B+"px";w.style.top=y+"px";c.changeUpdate(w,B,y)})};u.addEventListener(e.mouseup,function(K){this.removeEventListener(e.mousemove,
I,{passive:!0,once:!0});this.removeEventListener(e.mousemove,J,{passive:!0});v&&(K.stopImmediatePropagation(),r&&cancelAnimationFrame(r),r=v=null,this.body.classList.remove("tb_start_animate","tb_move_drag"))},{passive:!0,once:!0});u.addEventListener(e.mousemove,I,{passive:!0,once:!0});u.addEventListener(e.mousemove,J,{passive:!0})}},{passive:!0});k.addEventListener("click",this.click.bind(this));h.appendChild(m);h.appendChild(k);g.appendChild(h);void 0!==a.after&&g.appendChild(b.after(a));g.appendChild(p);
g.appendChild(q);b.afterRun.push(function(){setTimeout(function(){const n=window.getComputedStyle(k);c.w=parseInt(n.getPropertyValue("width"));c.h=parseInt(n.getPropertyValue("height"));c.update(a.id,f,b)},700)});return g}},slider_range:{render:function(a,b){const c=l.createElement("div"),d=l.createElement("div"),e=b.hidden.render(a,b);let f=0,g=100,h="%",k=!0,m=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&&(h=a.options.unit),
void 0!==a.options.range&&(k=!1),void 0!==a.options["default"]&&(m=a.options["default"]));e.setAttribute("data-min",f);e.setAttribute("data-max",g);e.setAttribute("data-unit",h);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 p=function(q){const n=l.createElement("span"),r=l.createElement("span");var v=parseFloat(e.getAttribute("data-min"));const u=parseFloat(e.getAttribute("data-max")),
w=e.getAttribute("data-unit");let x=e.value;x=k?x?x.split(","):[v,u]:x?x:m;n.className="tb_slider_label_l";r.className="tb_slider_label_u";v={range:k,min:v,max:u,slide:function(C,z){k?(n.textContent=z.values[0]+w,r.textContent=z.values[1]+w):n.textContent=z.value+w},create(C,z){C=this.getElementsByClassName("ui-slider-handle");k?(n.textContent=x[0]+w,C[0].appendChild(n),r.textContent=x[1]+w,C[1].appendChild(r)):(n.textContent=x+w,C[0].appendChild(n));x=null},change:function(C,z){e.value=k?z.values[0]+
","+z.values[1]:z.value}};k?v.values=x:v.value=x;H.jQuery.fn.slider.call(A(q),v)};b.afterRun.push(function(){H.Themify.LoadAsync(themifyBuilder.includes_url+"js/jquery/ui/slider.min.js",function(){p(d)},themify_vars.version,null,function(){return void 0!==H.jQuery.fn.slider})});return c}},range:{update(a,b,c){const d=c.getEl(a);null!==d&&(d.value=void 0!==b?b:"",b=a+"_unit",a=H.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=t.Utils.getMouseEvents();a.addEventListener(f.mousedown,
function(g){if("touchstart"===g.type||1===g.which){this.classList.contains("tb_angle_input")&&!this.parentNode.getElementsByClassName("tb_angle_circle")[0]||g.stopImmediatePropagation();let h=g.touches?g.touches[0].clientY:g.clientY,k;g=this.ownerDocument;const m=this,p=this.value,q=parseFloat(this.getAttribute("max")),n=parseFloat(this.getAttribute("min")),r=this.getAttribute("step")||1,v=0!==r%1,u=v?parseFloat(r):parseInt(r),w=function(C){var z=m.value||0;z=v?parseFloat(z):parseInt(z);C="increase"===
C?z>=q?q:z+u:z<=n?n:z-u;m.value=+C.toFixed(2);(z=m.parentNode.getElementsByClassName("tb_angle_dot")[0])&&(z.style.transform="rotate("+C+"deg)")},x=function(C){C.stopImmediatePropagation();k&&cancelAnimationFrame(k);k=requestAnimationFrame(function(){const z=C.touches?C.touches[0].clientY:C.clientY;z<h?w("increase"):z>h&&w("decrease");h=z;E.triggerEvent(m,c)})};g.addEventListener(f.mouseup,function(C){C.stopImmediatePropagation();this.removeEventListener(f.mousemove,x,{passive:!0});k&&cancelAnimationFrame(k);
k=h=null;m.value!==p&&E.triggerEvent(m,c);t.hasChanged=!0;this.body.style.cursor="";this.body.classList.remove("tb_start_animate","tb_move_drag")},{once:!0,passive:!0});g.body.style.cursor=A(this).css("cursor");g.body.classList.add("tb_start_animate","tb_move_drag");g.addEventListener(f.mousemove,x,{passive:!0});this.classList.contains("tb_angle_input")&&w()}},{passive:!0});!0===d&&b.addEventListener("change",function(g){e.setData(a,b.options[b.selectedIndex]);E.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=l.createElement("div");var d=l.createElement("span");const e=l.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.hint(a.tooltip));c.appendChild(d);if(!0===a.deg||void 0===a.units)e.min=0,e.max=!0===a.deg?360:1500,e.step=1;else{d=l.createElement("div");var g=Object.keys(a.units);d.className="selectwrapper noborder";if(1<g.length){f=b.getStyleVal(a.id+"_unit");const k=a.id+"_unit";g=l.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=k):(g.className+=" tb_lb_option",g.id=k);void 0!==a.select_class&&(g.className+=" "+a.select_class);for(var h in a.units){let m=l.createElement("option");a.units[h]||(a.units[h]={});a.units[h].min||(a.units[h].min=0);a.units[h].max||(a.units[h].max=100);e.setAttribute("min",parseInt(a.units[h].min));e.setAttribute("max",parseInt(a.units[h].max));m.value=h;m.textContent=h;m.dataset.min=a.units[h].min;m.dataset.max=a.units[h].max;m.dataset.increment=
void 0!==a.units[h].increment?a.units[h].increment:"em"===h||"em"===h?.1:1;f===h&&(m.selected=!0);g.appendChild(m)}b.initControl(g,{type:"select",id:k,control:a.control})}else h=g[0],a.units[h]||(a.units[h]={}),a.units[h].min||(a.units[h].min=0),a.units[h].max||(a.units[h].max=100),e.setAttribute("min",parseFloat(a.units[h].min)),e.setAttribute("max",parseFloat(a.units[h].max)),e.setAttribute("step",void 0!==a.units[h].increment?parseFloat(a.units[h].increment):"1"),f<parseFloat(a.units[h].min)?e.value=
a.units[h].min:f>parseFloat(a.units[h].max)&&(e.value=a.units[h].max),g=l.createElement("span"),g.className="tb_unit",g.id=a.id+"_unit",g.dataset.min=a.units[h].min,g.dataset.max=a.units[h].max,g.dataset.increment=void 0!==a.units[h].increment?a.units[h].increment:"em"===h||"em"===h?.1:1,g.textContent=h;d.appendChild(g);c.appendChild(d)}void 0!==a.after&&c.appendChild(b.after(a));void 0!==a.description&&c.appendChild(b.description(a.description));d="styling"===b.clicked?"keyup":"change";!0===a.opposite&&
g.addEventListener("change",function(k){k.stopPropagation();b.margin.changeUnit(this)},{passive:!0});this.controlChange(e,g,d);g=A.extend({},a);!0===a.opposite&&e.addEventListener(d,function(k){k.stopPropagation();b.margin.changeOppositive(this)},{passive:!0});g.type="range";b.initControl(e,g);return c}},icon:{render(a,b){const c=l.createElement("div"),d=l.createElement("input"),e=l.createElement("span"),f=l.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(t.Utils.getIcon(g)),b.afterRun.push(function(){setTimeout(function(){H.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=l.createElement("ul"),e=this,f=b.id,g="border_radius"===a,h=A.extend(!0,{},b);h.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}};h.prop=null;h.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 k=l.createDocumentFragment(),m=!1;for(let n=0;n<a;++n){var p=l.createElement("li");let r=f+"_"+c[n].id;h.id=r;h.tooltip=c[n].label;h.class=void 0===b["class"]?"":b["class"];h.class+=" tb_multi_field tb_range_"+c[n].id;!0===g&&(h.class+=" tb_is_border_radius");let v=this.range.render(h,this);if(0!==n&&3!==n){let u=l.createElement("li");var q="right"===c[n].id?"top":c[n].id;u.className="tb_seperate_opposite tb_opposite_"+
("bottom"===q?"top":q);u.appendChild(this.checkboxGenerate("checkbox",{id:f+"_opp_"+q,"class":"style_apply_oppositive",options:[{name:"1",value:""}],new_line:!1}));q=u.querySelector(".style_apply_oppositive");let w=l.createElement("div");w.className="tb_oppositive_state";q.parentNode.insertBefore(w,q.nextSibling);q.addEventListener("change",function(x){x.stopPropagation();e.margin.bindingOppositive(this,!0)},{passive:!0});!0===q.checked&&e.afterRun.push(function(){e.margin.bindingOppositive(this)}.bind(q));
k.appendChild(u)}p.appendChild(v);k.appendChild(p);!0===g?(p="border-","top"===c[n].id?p+="top-left-radius":"right"===c[n].id?p+="top-right-radius":"left"===c[n].id?p+="bottom-left-radius":"bottom"===c[n].id&&(p+="bottom-right-radius")):"transform"===b.type?p=b.prop:(p=b.prop+"-"+c[n].id,!0===this.is_new&&!m&&this.values[r]&&(m=!0));this.styles[r]={prop:p,selector:b.selector}}d.appendChild(k);k=l.createDocumentFragment();k.appendChild(d);if(4===a){k.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">'+t.Utils.getIcon("ti-link").outerHTML+"</span>"}],"default":"module"===this.component&&!0===this.is_new&&!m||0===Object.keys(this.values).length?"1":!1,new_line:!1}));const n=k.querySelector(".style_apply_all");n.addEventListener("change",function(r){e.margin.apply_all(this,!0)},{passive:!0});!0===n.checked&&e.afterRun.push(function(){e.margin.apply_all(n)})}return k},
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=l.createElement("ul"),e=A.extend(!0,{},a);d.className="tb_seperate_items tf_inline_b tb_has_opposite";for(let g=0;2>g;++g){var f=l.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=l.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 h=f.querySelector(".style_apply_oppositive"),k=l.createElement("div");k.className="tb_oppositive_state";h.parentNode.insertBefore(k,
h.nextSibling);h.addEventListener("change",function(m){m.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]],type:a.type,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 f=e.value,g=d.value;""!==f||""===g?(d.value=f,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&&E.triggerEvent(d,"keyup")},changeUnit(a){const b=a.closest(".tb_has_opposite");if(!b.hasAttribute("data-checked")){var c=H.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&&E.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=c.getEl(d).getElementsByClassName("style_apply_all")[0];for(let g=3;-1<g;--g){var f=a+"_"+b[g];if(null!==H.document.getElementById(f)&&(c.range.update(f,c.getStyleVal(f),c),!0!==e.checked)){f=a+"_opp_"+b[g];let h=H.document.getElementById(f);
null!==h&&(h.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 f=3;-1<f;--f){let g=a+"_"+b[f];null!==H.document.getElementById(g)&&c.range.update(g,c.getStyleVal(g),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=l.createElement("ul");var e=a.id;const f=A.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 h=c[g];let k=l.createElement("li"),m=e+"_"+g;f.id=m;f.tooltip=h.label;f.units=h.units;f.selector=a.selector;k.appendChild(b.range.render(f,b));d.appendChild(k);b.styles[m]={prop:a.prop,selector:a.selector}}c=e+"_color";g=l.createElement("li");h={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(h,b));d.appendChild(g);c=e+"_inset";g=l.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 e=2;-1<e;--e){let f=a+"_"+b[e];null!==c.getEl(f)&&c.range.update(f,c.getStyleVal(f),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=l.createElement("ul");var e=a.id,f=A.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 h=c[g],k=l.createElement("li"),m=e+"_"+g;f.id=m;f.tooltip=h.label;f.units=h.units;k.appendChild(b.range.render(f,
b));d.appendChild(k);b.styles[m]={prop:a.prop,selector:a.selector}}c=l.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)}},outline:{render(a,b){b.styles[a.id+"-c"]=a.selector;b.styles[a.id+"-w"]=a.selector;b.styles[a.id+
"-s"]=a.selector;return b.create([{type:"multi",options:[{type:"color",id:a.id+"-c",class:"outline_color"},{type:"range",id:a.id+"-w",units:{px:{max:300}},class:"outline_width"},{type:"select",id:a.id+"-s",options:b.static.border,class:"outline_style"}]}])}},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(e,
f){for(let g=c.length-1;-1<g;--g)c[g].parentNode.classList.toggle("_tb_disable",e&&"all"!==c[g].value);!0===e?a.dataset.checked=1:a.removeAttribute("data-checked");!0===f&&E.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 f=0;4>f;++f){var e=a+"_"+
b[f];let g=e+"_color",h=e+"_style";e+="_width";c.color.update(g,c.getStyleVal(g),c);c.select.update(h,c.getStyleVal(h),c);this.changeControl(c.getEl(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=l.createElement("ul"),e=a.id,f=A.extend(!0,{},a),g=this,h=A.extend(!0,{},a);h.options=[{value:"all",name:b.label.all,"class":"style_apply_all",icon:'<i class="tic-border-all"></i>',label_class:"tb_radio_label_borders"}];
h.option_js=!0;h.id=e+"-type";h.no_toggle=!0;h["default"]="top";h.prop=null;f.options=b.static.border;f.prop=null;d.className="tb_seperate_items tb_borders tb_group_element_border";for(let m=0;4>m;++m){let p=l.createElement("li");var k=e+"_"+c[m];h.options.push({value:c[m],name:b.label[c[m]],icon:'<i class="tic-border-'+c[m]+'"></i>',label_class:"tb_radio_label_borders"});p.className="tb_group_element_"+c[m];"top"===c[m]&&(p.className+=" tb_group_element_all");b.styles[k+"_color"]={prop:"border-"+
c[m],selector:a.selector};f.id=k+"_color";f.type="color";f.class="border_color";p.appendChild(b.color.render(f,b));b.styles[k+"_width"]={prop:"border-"+c[m],selector:a.selector};f.id=k+"_width";f.type="range";f.class="border_width";f.wrap_class="range_wrapper";f.units={px:{max:300}};p.appendChild(b.range.render(f,b));b.styles[k+"_style"]={prop:"border-"+c[m],selector:a.selector};f.id=k+"_style";f.type="select";f.class="border_style tb_multi_field";k=b.select.render(f,b);let q=k.querySelector("select");
p.appendChild(k);d.appendChild(p);q.addEventListener("change",function(n){g.changeControl(this)},{passive:!0});"none"===q.value&&g.changeControl(q)}a=l.createDocumentFragment();a.appendChild(b.radioGenerate("icon_radio",h,b));g.apply_all(d,a.querySelector("#"+h.id));a.appendChild(d);return a}},slider:{render(a,b){const c=a.label;delete a.label;["crossfade","cover-fade","uncover-fade"].includes(b.values.effect_slider)&&(b.values.effect_slider="fade");return b.create([{type:"group",label:c,display:"accordion",
options:b.getOptions(a),wrap_class:a.wrap_class}])}},custom_css:{render(a,b){a.class="large";a.control=!1;a.help=b.label.custom_css_help;b=b.text.render(a,b);t.Utils.changeOptions(b.querySelector("#"+a.id),a.type);return b}},custom_css_id:{render(a,b){let c=[];a.custom_css&&c.push({id:a.custom_css,type:"custom_css"});c.push({id:"custom_css_id",type:"text",label:b.label.id_name,help:b.label.id_help,control:!1,"class":"large"});b=b.create([{type:"group",label:b.label.cc,display:"accordion",options:c,
wrap_class:"tb_field_group_css"}],b);t.Utils.changeOptions(b.querySelector("#custom_css_id"),a.type);return b}},hidden:{render(a,b){const c=l.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=l.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);t.Utils.changeOptions(b.querySelector("#"+a.id),a.type);return b}},widget_form:{render(a,b){b=l.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=l.createDocumentFragment(),d=l.createElement("div"),e=l.createElement("i"),f=l.createElement("input"),g=l.createElement("div"),h=l.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;h.id=a.id;h.className="tb_lb_option tb_widget_select";this.el=h;d.appendChild(e);d.appendChild(f);g.appendChild(h);c.appendChild(d);c.appendChild(g);const k=this,m=b.values[a.id],p=function(){const q=[],n=function(v,u){for(var w=q.length-1;-1<w;--w)q[w].classList.remove("selected");v.classList.add("selected");w=v.dataset.value;f.value=v.getElementsByClassName("widget-title")[0].textContent;
g.style.display="none";k.select(w,k.data[w].b,u,a)};for(let v in k.data){let u=l.createElement("div");var r=l.createElement("div");let w=l.createElement("h3");u.className="widget-tpl "+k.data[v].b;u.dataset.value=v;r.className="widget-title";w.textContent=k.data[v].n;r.appendChild(w);u.appendChild(r);u.addEventListener("click",function(x){x.preventDefault();x.stopPropagation();b.settings[a.id]=this.dataset.value;n(this,null)});q.push(u);void 0!==k.data[v].d&&(r=l.createElement("div"),r.className=
"widget-description",r.innerHTML=k.data[v].d,u.appendChild(r));h.appendChild(u);m===v&&n(u,b.values.instance_widget)}k.search(f,g);e.parentNode.removeChild(e);t.hasChanged=!0};if(null===k.data){A.ajax({type:"POST",url:themifyBuilder.ajaxurl,dataType:"json",data:{action:"tb_get_widget_items",nonce:themifyBuilder.tb_load_nonce},success(q){k.data=q;p()}});for(let q in themifyBuilder.widget_css)H.Themify.LoadCss(themifyBuilder.widget_css[q],themify_vars.version);themifyBuilder.widget_css=null}else setTimeout(p,
5);return c},search(a,b){const c=this;a.addEventListener("focus",this.show.bind(this),{passive:!0});a.addEventListener("blur",function(d){d.relatedTarget&&"available-widgets"===d.relatedTarget.id||(b.style.display="none")},{passive:!0});a.addEventListener("keyup",function(d){c.show();d=this.value.trim();const e=new RegExp(d,"i"),f=c.el.getElementsByClassName("widget-tpl");for(let g=0,h=f.length;g<h;++g)if(""===d)f[g].style.display="block";else{let k=f[g].getElementsByTagName("h3")[0];k=k.textContent||
k.innerText;e.test(k)?f[g].style.display="block":f[g].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=A("#instance_widget",L.Lightbox.$lightbox),g=function(h){const k=function(){const p=A(h.form);f.addClass("open").html(p.html());if(c)for(let q in c)p.find('[name="'+q+'"]').val(c[q]);"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"]]);A(l).trigger("widget-added",[f]);"text"===b&&ThemifyConstructor.initControl(f.find(".wp-editor-area")[0],{control:{control_type:"wp_editor",type:"refresh"}});if("visual"===t.mode){const q=A.extend(!0,{},d);q.id=f[0].id;f.on("change",":input",function(){!1===t.is_ajax_call&&ThemifyConstructor.control.widget_select(f,
q)});a&&ThemifyConstructor.control.widget_select(f,q)}f.removeClass("tb_loading_widgets_form").find("select").wrap('<span class="selectwrapper"/>')},m=function(p,q){const n=p.length;(function(r,v){E.LoadAsync(r,v,h.v)})(p[q].src,function(){if(p[q].extra&&p[q].extra.after){var r=p[q].extra.after;let u="";if("object"===typeof r)for(var v in r)r[v]&&(u+=r[v]);""!==u&&(r=l.createElement("script"),v=l.getElementsByTagName("script")[0],r.type="text/javascript",r.text=u,v.parentNode.insertBefore(r,v))}++q;
q<n?m(p,q):k()})};void 0===e.cache[b]?(h.template&&l.body.insertAdjacentHTML("beforeend",h.template),0<h.src.length?m(h.src,0):k()):k()};f.addClass("tb_loading_widgets_form").html('<div class="tf_loader"></div>');c&&A.each(c,function(h,k){const m=h.match(/.*\[\d\]\[(.*)\]/);A.isArray(m)&&"undefined"!==m[1]&&(delete c[h],c[m[1]]=k)});A.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(h){h&&h.form&&(g(h),e.cache[b]=1)}})}},message:{render(a,b){b=l.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=l.createElement("ul"),e=a.id,f=A.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 h=c[g],k=l.createElement("li"),m=l.createElement("div"),p=l.createElement("span"),q=e+"_"+g;f.id=q;
f.units=h.units;f.selector=a.selector;m.className="tb_label";p.className="tb_label_text";p.textContent=h.label;m.appendChild(p);k.appendChild(m);"hue"===g?(f.deg=!0,k.appendChild(b.angle.render(f,b)),delete f.deg):k.appendChild(b.range.render(f,b));d.appendChild(k);b.styles[q]={prop:h.prop,selector:a.selector}}return d}},help(a){const b=l.createElement("div"),c=l.createElement("div"),d=l.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},hint(a){const b=l.createElement("span");b.className="tb_tooltip_up";b.textContent=a;return b},description(a){const b=l.createElement("small");b.innerHTML=a;return b},after(a){const b=l.createElement("span");b.className="tb_input_after";b.textContent=void 0!==this.label[a.after]?this.label[a.after]: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=l.createDocumentFragment(),d=A.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!==t.activeModel&&t.Utils.visibilityLabel(l.querySelector(".tb_element_cid_"+
t.activeModel.cid),t.activeModel)},{passive:!0})},render(a,b){var c=A.extend(!0,{},a);const d={},e=l.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 h=c.options;if(void 0===h||"simple"===h)"simple"===h?h={on:{name:"yes",value:b.label.y},off:{name:"no",value:b.label.no}}:(h={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?h.on.name:void 0!==h.off?h.off.name:""):(!1===g&&(g=""),f=h.on.name===g?"on":"off");for(var k in h)void 0===c.after&&void 0!==h[k].value&&e.setAttribute("data-"+k,void 0!==b.label[h[k].value]?b.label[h[k].value]:h[k].value),d[k]=h[k];k=Object.keys(h)[0];delete c.binding;delete h[k].value;delete c["default"];c.options=[h[k]];void 0===c.wrap_checkbox&&(c.wrap_checkbox="");c.wrap_checkbox+=" tb_switcher";e.className="switch_label";c=b.checkboxGenerate("checkbox",c);
h=c.querySelector(".toggle_switch");h.value=g;h.checked="on"===f;this.controlChange(h,d);h.parentNode.appendChild(e);b.initControl(h,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=A.extend(!0,{},a);e.addEventListener("change",function(m){const p=H.document.getElementsByClassName("tb_group_element_"+a.id+"_width")[0];p&&p.classList.toggle("hide-auto-height",m.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 k=b.create([f]);b.styles[f.id]={prop:f.prop,selector:a.selector};b.afterRun.push(function(){const m=d.parentNode.closest(".tb_field");m.parentNode.insertBefore(g,m);m.parentNode.insertBefore(k,m.nextSibling);m.parentNode.insertBefore(h,m.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=l.createElement("ul"),e=l.createElement("li"),f=l.createDocumentFragment(),g=l.createDocumentFragment(),h=a.id,k=A.extend(!0,{},a),m=A.extend(!0,{},a);m.options=[];m.option_js=!0;m.id=h+"-type";m.no_toggle=!0;m["default"]="top";m.prop=null;d.className="tb_seperate_items tb_group_element_position";for(let p in c){let q=l.createElement("li"),n=h+"_"+p;m.options.push({value:p,name:b.label[c[p]],icon:'<i class="tic-border-'+p+'"></i>',label_class:"tb_radio_label_borders"});
q.className="tb_group_element_"+p;b.styles[n]={prop:p,selector:a.selector};k.id=n;k.type="range";k.prop="position";k.wrap_class="range_wrapper "+n;k.units={px:{min:-2E3,max:2E3},"%":""};q.appendChild(b.range.render(k,b));b.styles[n+"_auto"]={prop:"position",selector:a.selector};q.appendChild(b.checkboxGenerate("checkbox",{id:n+"_auto",is_position:!0,posId:n,prop:p,type:"checkbox",selector:a.selector,options:[{name:"auto",value:b.label.auto}],wrap_checkbox:"tf_inline_b",binding:{checked:{hide:n},not_checked:{show:n}}}));
f.appendChild(q)}e.appendChild(b.radioGenerate("icon_radio",m,b));d.insertBefore(e,d.childNodes[0]);d.appendChild(f);b.styles[h]={prop:"position",selector:a.selector};k.id=h;k.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"}};k.type="select";k.prop="position";k.options={"":"",absolute:b.label.abs,fixed:b.label.fi,relative:b.label.re,
"static":b.label.st};k.class="tb_position_field tb_multi_field";g.appendChild(b.select.render(k,b));g.appendChild(d);return g}},transform:{_label(a){const b=l.createElement("div"),c=l.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=l.createElement("li"),g=A.extend(!0,{},c);f.appendChild(this._label(e));g.prop=a;g.orig_id=c.id;g.options=[{id:"top",label:"X"},{id:"bottom",label:"Y"}];g.units=b;g.id=c.id+"_"+a;
f.appendChild(d.createMarginPadding(c.type,g));return f},_rotate(a,b){const c=["x","y","z"],d=l.createElement("ul"),e=l.createElement("li");d.className="tb_seperate_items tf_inline_b tf_left tb_tr_rotate";e.appendChild(this._label(b.label.ro));a.orig_id=a.id;const f=A.extend(!0,{},a);for(let g in c)if(c.hasOwnProperty(g)){let h=l.createElement("li");f.id=a.id+"_rotate_"+c[g];f.prop="rotate";f.deg=!0;f.tooltip=c[g];h.appendChild(b.angle.render(f,b));d.appendChild(h)}e.appendChild(d);return e},render(a,
b){const c=l.createElement("ul");c.className="tb_seperate_items tb_transform_fields";c.appendChild(this._xy("scale",{x:{min:-100,max:1E3,increment:.1}},a,b,b.label.sc));c.appendChild(this._xy("translate",{px:{min:-2E3,max:2E3},"%":{min:-100,max:100},em:{min:0,max:100}},a,b,b.label.tl));c.appendChild(this._rotate(a,b));c.appendChild(this._xy("skew",{deg:{min:-180,max:180}},a,b,b.label.sk));return c}},code_editor:{load:a=>{if("undefined"===typeof H.wp.codeEditor){const b=function(d){delete themifyBuilder.c_e.assets[d];
0===Object.keys(themifyBuilder.c_e.assets).length&&(delete themifyBuilder.c_e.assets,E.trigger("codemirror_loaded"),"function"===typeof a&&a())},c=Object.keys(themifyBuilder.c_e.assets);for(let d=c.length-1;-1<d;d--)"js"===themifyBuilder.c_e.assets[c[d]].t?H.Themify.LoadAsync(themifyBuilder.c_e.assets[c[d]].u,function(){b(c[d])},themifyBuilder.c_e.assets[c[d]].v):H.Themify.LoadCss(themifyBuilder.c_e.assets[c[d]].u,themifyBuilder.c_e.assets[c[d]].v,null,null,function(){b(c[d])})}else"function"===typeof a&&
a()},setHeight:(a,b)=>{const c=JSON.parse(localStorage.getItem("tb_code_editor"));c&&c[b]&&(a.style.height=c[b]+"px");(new ResizeObserver(d=>{d=parseInt(d[0].target.style.height);if(!isNaN(d)){const e=JSON.parse(localStorage.getItem("tb_code_editor"))||{};e[b]=d;localStorage.setItem("tb_code_editor",JSON.stringify(e))}})).observe(a)}}}})(jQuery,Themify,window.top,document);
