Edit File: themify-builder-visual.min.js
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(l,p,t){l instanceof String&&(l=String(l));for(var w=l.length,u=0;u<w;u++){var f=l[u];if(p.call(t,f,u,l))return{i:u,v:f}}return{i:-1,v:void 0}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(l,p,t){l!=Array.prototype&&l!=Object.prototype&&(l[p]=t.value)};$jscomp.getGlobal=function(l){return"undefined"!=typeof window&&window===l?l:"undefined"!=typeof global&&null!=global?global:l}; $jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(l,p,t,w){if(p){t=$jscomp.global;l=l.split(".");for(w=0;w<l.length-1;w++){var u=l[w];u in t||(t[u]={});t=t[u]}l=l[l.length-1];w=t[l];p=p(w);p!=w&&null!=p&&$jscomp.defineProperty(t,l,{configurable:!0,writable:!0,value:p})}};$jscomp.polyfill("Array.prototype.find",function(l){return l?l:function(l,t){return $jscomp.findInternal(this,l,t).v}},"es6-impl","es3");$jscomp.SYMBOL_PREFIX="jscomp_symbol_"; $jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(l){return $jscomp.SYMBOL_PREFIX+(l||"")+$jscomp.symbolCounter_++}; $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var l=$jscomp.global.Symbol.iterator;l||(l=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[l]&&$jscomp.defineProperty(Array.prototype,l,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(l){var p=0;return $jscomp.iteratorPrototype(function(){return p<l.length?{done:!1,value:l[p++]}:{done:!0}})}; $jscomp.iteratorPrototype=function(l){$jscomp.initSymbolIterator();l={next:l};l[$jscomp.global.Symbol.iterator]=function(){return this};return l};$jscomp.iteratorFromArray=function(l,p){$jscomp.initSymbolIterator();l instanceof String&&(l+="");var t=0,w={next:function(){if(t<l.length){var u=t++;return{value:p(u,l[u]),done:!1}}w.next=function(){return{done:!0,value:void 0}};return w.next()}};w[Symbol.iterator]=function(){return w};return w}; $jscomp.polyfill("Array.prototype.keys",function(l){return l?l:function(){return $jscomp.iteratorFromArray(this,function(l){return l})}},"es6-impl","es3");$jscomp.polyfill("Array.prototype.findIndex",function(l){return l?l:function(l,t){return $jscomp.findInternal(this,l,t).i}},"es6-impl","es3"); $jscomp.checkStringArgs=function(l,p,t){if(null==l)throw new TypeError("The 'this' value for String.prototype."+t+" must not be null or undefined");if(p instanceof RegExp)throw new TypeError("First argument to String.prototype."+t+" must not be a regular expression");return l+""}; $jscomp.polyfill("String.prototype.endsWith",function(l){return l?l:function(l,t){var p=$jscomp.checkStringArgs(this,l,"endsWith");l+="";void 0===t&&(t=p.length);for(var u=Math.max(0,Math.min(t|0,p.length)),f=l.length;0<f&&0<u;)if(p[--u]!=l[--f])return!1;return 0>=f}},"es6-impl","es3");$jscomp.polyfill("Array.prototype.values",function(l){return l?l:function(){return $jscomp.iteratorFromArray(this,function(l,t){return t})}},"es6","es3"); (function(l,p,t,w,u,f,I){function O(b){function d(a){var c="",e;for(e in a)c+=a[e];u.body.insertAdjacentHTML("beforeend",c);b&&b()}if(f.Forms.LayoutPart.init)b&&b();else{var a=function(){if(themifyBuilder.debug)return!1;try{var a=localStorage.getItem("tb_visual_templates"),c="";if(!a)return!1;var a=JSON.parse(a),b;for(b in themifyBuilder.modules)c+=b;return a.ver.toString()!==tbLocalScript.version.toString()||a.h!==p.hash(c)?!1:a.val}catch(g){}return!1}();a?d(a):l.ajax({type:"POST",url:themifyBuilder.ajaxurl, dataType:"json",data:{action:"tb_load_visual_templates",tb_load_nonce:themifyBuilder.tb_load_nonce},success:function(a){if(a){d(a);try{var c="",e;for(e in themifyBuilder.modules)c+=e;var b={val:a,ver:tbLocalScript.version,h:p.hash(c)};localStorage.setItem("tb_visual_templates",JSON.stringify(b))}catch(m){}}}})}}function P(){for(var b=w.document.getElementsByClassName("tb_middle_bar"),d=function(a){var c=a.clientX,e="tb_right_bar"===this.id?"right":"left",b=tbLocalScript.breakpoints,d=f.toolbar.$el.width(), n=f.iframe.css("transition","none").width(),q=w.document.getElementsByClassName("tb_vertical_change_tooltip")[0],h=w.document.getElementsByClassName("tb_vertical_bars")[0],E=u.createElement("div");E.className="tb_mousemove_cover";void 0!==q&&q.parentNode.removeChild(q);q=u.createElement("div");q.className="tb_vertical_change_tooltip";this.appendChild(q);h.appendChild(E);h.className+=" tb_resizing_start";f.iframe[0].classList.add("tb_resizing_start");var r=l(t),v=function(a){a=a.clientX-c;a*=2;"left"=== e&&(a=-a);var g=320>n+a?320:n+a;g<=b.mobile?a="mobile":g<=b.tablet[1]?a="tablet":g<=b.tablet_landscape[1]?a="tablet_landscape":(a="desktop",g>d-17&&(g=d));q.textContent=g+"px";f.iframe.css("width",g);f.activeBreakPoint!==a&&ThemifyConstructor.lightboxSwitch(a)};E.addEventListener("mousemove",v,{passive:!0});E.addEventListener("mouseup",function F(a){E.removeEventListener("mousemove",v,{passive:!0});E.removeEventListener("mouseup",F,{once:!0,passive:!0});E.parentNode.removeChild(E);q.parentNode.removeChild(q); f.iframe.css("transition","");h.classList.remove("tb_resizing_start");f.iframe[0].classList.remove("tb_resizing_start");f.Utils._onResize(!0);r.triggerHandler("tfsmartresize.tbfullwidth");r.triggerHandler("tfsmartresize.tfVideo")},{once:!0,passive:!0})},a=b.length-1;-1<a;--a)b[a].addEventListener("mousedown",d,{passive:!0});b=null}var L=[],K=[];f.mode="visual";f.iframe="";f.id="";f.is_ajax_call=!1;f.Mixins.Frontend={render_visual:function(b){var d={},a=this.el.querySelectorAll("[data-cid]"),a=Array.prototype.slice.call(a); a.unshift(this.el);for(var e=0,c=a.length;e<c;++e){var k=f.Models.Registry.lookup(a[e].getAttribute("data-cid"));k&&(d[k.cid]=k.toJSON())}f.bootstrap(d,b)},change_callback:function(){var b=this.$el;b[0].insertAdjacentHTML("afterbegin",'<span class="sp-preloader tb_preview_component"></span>');this.render_visual(function(){b.find(".tb_preview_component").remove();f.Utils.setCompactMode(b[0].getElementsByClassName("module_column"));var d="row"===f.eventName?b.data("cid"):f.beforeEvent.data("cid");f.undoManager.push(d, f.beforeEvent,b,f.eventName);f.Mixins.Builder.update(b)})},createEl:function(b){var d=this.model.get("elType"),a=u.createElement("div");a.innerHTML=b;var e=a.getElementsByClassName("module_"+d)[0],c=e.classList,k=e.attributes;b=0;for(a=c.length;b<a;++b)this.el.classList.add(c[b]);for(b=k.length-1;-1<b;--b)"class"!==k[b].name&&(a=k[b].name,this.el.setAttribute(a,k[b].value),0===a.indexOf("data-")&&this.$el.data(a.replace("data-",""),k[b].value));c=e.getElementsByClassName("builder_row_cover")[0];k= e.getElementsByClassName(d+"-slider")[0];e=e.getElementsByClassName("tb_row_frame");if(0<e.length){var g=u.createDocumentFragment(),m=this.el.getElementsByClassName("tb_row_frame");b=0;for(a=m.length;b<a;++b)m[b].parentNode.removeChild(m[b]);b=0;for(a=e.length;b<a;++b)g.appendChild(e[b].cloneNode());this.el.insertBefore(g,this.el.firstChild)}c&&((b=this.el.getElementsByClassName("builder_row_cover")[0])?this.el.replaceChild(c,b):this.el.insertAdjacentElement("afterbegin",c));k&&((d=this.el.getElementsByClassName(d+ "-slider")[0])?this.el.replaceChild(k,d):this.el.insertAdjacentElement("afterbegin",k))},restoreHtml:function(b){var d=u.createElement("div");d.innerHTML=b;b=l(d.firstChild);var d=f.liveStylingInstance.$liveStyledElmt,a=b[0].querySelectorAll("[data-cid]"),a=Array.prototype.slice.call(a);a.unshift(b[0]);for(var e=a.length-1;-1<e;--e){var c=f.Models.Registry.lookup(a[e].getAttribute("data-cid"));c&&c.trigger("change:view",a[e])}d.replaceWith(b);f.Mixins.Builder.update(b)}};f.previewVisibility=function(){var b= "row"===this.model.get("elType")?this.$el:this.$el.find(".module"),d="row"===this.model.get("elType")?this.model.get("styling"):this.model.get("mod_settings");if(f.isPreview){"hide_all"===d.visibility_all?b.addClass("hide-all"):("hide"===d.visibility_desktop&&b.addClass("hide-desktop"),"hide"===d.visibility_tablet&&b.addClass("hide-tablet"),"hide"===d.visibility_tablet_landscape&&b.addClass("hide-tablet_landscape"),"hide"===d.visibility_mobile&&b.addClass("hide-mobile"));var a=!1;_.isEmpty(d.custom_parallax_scroll_speed)|| (a=!0,b[0].dataset.parallaxElementSpeed=parseInt(d.custom_parallax_scroll_speed));_.isEmpty(d.custom_parallax_scroll_reverse)||(b[0].dataset.parallaxElementReverse=!0);_.isEmpty(d.custom_parallax_scroll_fade)||(b[0].dataset.parallaxFade=!0);a&&ThemifyBuilderModuleJs.parallaxScrollingInit(b,!0)}else b.removeClass("hide-desktop hide-tablet hide-tablet_landscape hide-mobile hide-all"),_.isEmpty(d.custom_parallax_scroll_speed)||Rellax.destroy(b[0].dataset.rellaxIndex)};_.extend(f.Views.BaseElement.prototype, f.Mixins.Frontend);f.Views.register_row({initialize:function(){this.listenTo(this.model,"create:element",this.createEl);this.listenTo(this.model,"visual:change",this.change_callback);this.listenTo(this.model,"custom:restorehtml",this.restoreHtml);f.vent.on("dom:preview",f.previewVisibility.bind(this))}});f.Views.register_subrow({initialize:function(){this.listenTo(this.model,"create:element",this.createEl);this.listenTo(this.model,"visual:change",this.change_callback);this.listenTo(this.model,"custom:restorehtml", this.restoreHtml)}});f.Views.register_column({initialize:function(){this.listenTo(this.model,"create:element",this.createEl);this.listenTo(this.model,"visual:change",this.change_callback);this.listenTo(this.model,"custom:restorehtml",this.restoreHtml)}});f.Views.register_module({_jqueryXhr:!1,templateVisual:function(b){return wp.template("builder-"+this.model.get("mod_name")+"-content")(b)},initialize:function(){this.listenTo(this.model,"create:element",this.createEl);this.listenTo(this.model,"visual:change", this.change_callback);this.listenTo(this.model,"custom:restorehtml",this.restoreHtml);this.listenTo(this.model,"custom:preview:live",this.previewLive);this.listenTo(this.model,"custom:preview:refresh",this.previewReload);f.vent.on("dom:preview",f.previewVisibility.bind(this))},createEl:function(b){var d=u.createElement("div"),a=u.createElement("div"),e=u.createElement("div"),c=u.createElement("div"),k=this.model.get("mod_name");d.innerHTML=b;var g=d.getElementsByClassName("module")[0],d=b=null;if(void 0=== g)return f.Models.Registry.remove(this.model.cid),this.model.destroy(),!1;this.el.innerHTML=g.innerHTML;a.className="tb_data_mod_name";a.innerHTML=themifyBuilder.modules[k].name;e.className="tb_column_btn_plus tb_module_btn_plus tb_disable_sorting";c.className="tb_action_wrap tb_module_action";this.el.appendChild(a);this.el.appendChild(c);this.el.appendChild(e);b=g.attributes;g=e=e=null;this.el.className=this.attributes()["class"];e="tb_"+this.model.get("element_id");for(g=b.length-1;-1<g;--g)if("class"=== b[g].name)for(d=b[g].value.split(" "),a=d.length-1;-1<a;--a)d[a]=d[a].trim(),e!==d[a]&&""!==d[a]&&this.el.classList.add(d[a]);else d=b[g].name,this.el.setAttribute(d,b[g].value),0===d.indexOf("data-")&&this.$el.data(d.replace("data-",""),b[g].value);"image"===k&&!0===p.is_builder_loaded&&!1===f.id&&setTimeout(function(){f.Utils.checkImageSize(this.el)}.bind(this),500);b=null},shortcodeToHTML:function(b){function d(c){void 0!==a._shortcodeXhr&&4!==a._shortcodeXhr&&a._shortcodeXhr.abort();a._shortcodeXhr= l.ajax({type:"POST",url:themifyBuilder.ajaxurl,dataType:"json",data:{action:"tb_render_element_shortcode",shortcode_data:JSON.stringify(c),tb_load_nonce:themifyBuilder.tb_load_nonce},success:function(c){if(c.success){var e=c.data.shortcodes,b=c.data.styles;if(b){c=0;for(var g=b.length;c<g;++c)p.LoadCss(b[c].s,b[c].v,null,b[c].m)}c=0;for(g=e.length;c<g;++c)b=p.hash(e[c].key),a.$el.find(".tmp"+b).replaceWith(e[c].html),L[b]=e[c].html,p.is_builder_loaded&&f.Utils.loadContentJs(a.$el,"module")}}})}for(var a= this,e=[],c=!1,k=themifyBuilder.available_shortcodes,g=0,m=k.length;g<m;++g)b=wp.shortcode.replace(k[g],b,function(a){a=wp.shortcode.string(a);var b=p.hash(a);void 0===L[b]?(e.push(a),a='<span class="tmp'+b+'">[loading shortcode...]</span>'):a=L[b];c=!0;return a});c&&0<e.length&&d(e);return{content:b,found:c}},previewLive:function(b,d,a,e,c){f.is_ajax_call=!1;this._jqueryXhr&&4!==this._jqueryXhr&&this._jqueryXhr.abort();var k=null!==f.activeModel&&e,g=300;b.cid=a?a:f.activeModel.cid;if(!k||!0===d){var m= this.templateVisual(b);if(f.is_ajax_call)return;!0===d&&(b=this.shortcodeToHTML(m),b.found&&(g=1E3,m=b.content,k=null))}if(k)if(a=e.length,void 0===a)e.innerHTML=c;else for(k=0;k<a;++k)e[k].innerHTML=c;else if(this.createEl(m),!a){f.liveStylingInstance.$liveStyledElmt=this.$el;var n=this;this.timeout&&clearTimeout(this.timeout);this.timeout=setTimeout(function(){f.Utils.loadContentJs(n.$el,"module")},g)}},previewReload:function(b,d,a){function e(a){k.createEl(a);f.liveStylingInstance.$liveStyledElmt= k.$el;f.Utils.loadContentJs(k.$el,"module");k.$el.find(".tb_preview_component").remove()}if(d&&f.activeModel.cid&&a)if(b=d.length,void 0===b)d.innerHTML=a;else for(var c=0;c<b;++c)d[c].innerHTML=a;else{var k=this;this._jqueryXhr&&4!==this._jqueryXhr&&this._jqueryXhr.abort();f.is_ajax_call=!0;d=this.model.get("mod_name");a=b.unsetKey;k.el.insertAdjacentHTML("afterbegin",'<span class="tb_preview_component sp-preloader"></span>');delete b.cid;b.unsetKey;b.element_id;b=f.Utils.clear(b);b["module_"+d+ "_slug"]=d;b=JSON.stringify(b);var g=p.hash(b);if(void 0===K[g]||a)return K[g]={},this._jqueryXhr=l.ajax({type:"POST",url:themifyBuilder.ajaxurl,data:{action:"tb_load_module_partial",tb_post_id:this.$el.closest(".themify_builder_content").data("postid"),tb_cid:this.model.cid,element_id:this.model.get("element_id"),tb_module_slug:d,tb_module_data:b,tb_load_nonce:themifyBuilder.tb_load_nonce},success:function(a){K[g]=a;e(a);k._jqueryXhr=!1;f.is_ajax_call=!1},error:function(){k.$el.removeClass("tb_preview_loading")}}), this;e(K[g])}}});f.bootstrap=function(b,d){var a=[],e=b?!0:!1;b||(b=f.Models.Registry.items);for(var c in b){var k=f.Models.Registry.items[c],g=k.toJSON(),m=g.elType,n=g["module"===m?"mod_settings":"styling"];if(n&&0<Object.keys(n).length)!0===e&&f.liveStylingInstance.setCss([g],"module"===m?g.mod_name:m);else if("module"!==m)continue;if("module"===m&&"tile"!==g.mod_name&&"ajax"!==themifyBuilder.modules[g.mod_name].type)k.trigger("custom:preview:live",g.mod_settings,"accordion"===g.mod_name||"box"=== g.mod_name||"feature"===g.mod_name||"tab"===g.mod_name||"text"===g.mod_name||"plain-text"===g.mod_name||"pointers"===g.mod_name||"pro-image"===g.mod_name||"countdown"===g.mod_name||"button"===g.mod_name||"pro-slider"===g.mod_name||"timeline"===g.mod_name,c);else{if("column"===m)delete g.modules;else if("row"===m||"module"===m||"subrow"===m){if("row"===m&&"tb-page-break"===n.custom_css_row)continue;delete g.cols}a.push({jobID:c,data:g})}}this.batch_rendering(a,0,360,d)};f.batch_rendering=function(b, d,a,e){if(d>=b.length)"function"===typeof e&&e.call(this),f.toolbar.pageBreakModule.countModules();else{var c=b.slice(d,d+a);this.render_element(c).done(function(){f.batch_rendering(b,d+=a,a,e)})}};f.render_element=function(b){b={action:"tb_render_element",batch:JSON.stringify(b),tb_load_nonce:themifyBuilder.tb_load_nonce,tb_post_id:themifyBuilder.post_ID};var d=Object.keys(f.GS.styles);if(void 0!==themifyBuilder.globalStyles&&Object.keys(themifyBuilder.globalStyles).length<=d.length){for(var a=[], e=d.length-1;-1<e;--e)a.push(d[e]);b.loadedGS=a}return l.ajax({type:"POST",url:themifyBuilder.ajaxurl,dataType:"json",data:b,success:function(a){if(void 0!==a.gs){for(var c=Object.keys(a.gs),e=c.length-1;-1<e;--e)f.GS.styles[c[e]]=a.gs[c[e]],f.liveStylingInstance.setCss(f.GS.styles[c[e]].data,void 0,f.GS.styles[c[e]]["class"]),f.GS.styles[c[e]].cssLoaded=!0;delete a.gs}for(var b in a)f.Models.Registry.lookup(b).trigger("create:element",a[b])}})};f.render=function(){O(function(){for(var b=u.getElementsByClassName("themify_builder_content"), d=themifyBuilder.post_ID,a=null,e=b.length-1;-1<e;--e)b[e].getAttribute("data-postid")!=d?b[e].classList.add("not_editable_builder"):null===a&&(a=b[e],a.setAttribute("id","themify_builder_content-"+d),a.setAttribute("data-postid",d),a.classList.remove("not_editable_builder"));b=null;b=t["builderdata_"+d]?t["builderdata_"+d].data:[];b=Array.isArray(b)&&0!==b.length?b.filter(function(a){return 0<Object.keys(a).length}):{};t["builderdata_"+d]=null;f.id=d;f.Instances.Builder[f.builderIndex]=new f.Views.Builder({el:a, collection:new f.Collections.Rows(b),type:f.mode});f.Instances.Builder[f.builderIndex].render();b=null;f.bootstrap(null,function(){ThemifyStyles.init(ThemifyConstructor.data,ThemifyConstructor.breakpointsReverse,d);f.liveStylingInstance=new N;f.liveStylingInstance.setCss(f.Mixins.Builder.toJSON(f.Instances.Builder[0].el));f.toolbar.el.style.display="block";w.jQuery("body").trigger("themify_builder_ready");f.Utils.loadContentJs();w.document.body.insertAdjacentHTML("beforeend",themifyBuilder.data); themifyBuilder.data=null;p.is_builder_loaded=!0;f.Instances.Builder[f.builderIndex].$el.triggerHandler("tb_init");setTimeout(P,2E3);f.id=!1;setTimeout(function(){f.Utils.checkAllimageSize();f.EdgeDrag.init()},500)})})};p.body.one("builderiframeloaded.themify",function(b,d){f.iframe=l(d);setTimeout(function(){p.LoadCss(tbLocalScript.builder_url+"/css/animate.min.css")},1);I.setToolbar();f.toolbar=new f.Views.Toolbar({el:"#tb_toolbar"});f.toolbar.render();p.LoadAsync(tbLocalScript.builder_url+"/js/themify-constructor.js", function(){ThemifyConstructor.getForms(f.render)},null,null,function(){return"undefined"!==typeof ThemifyConstructor});setTimeout(function(){w.Themify.LoadCss(themify_vars.url+"/fontawesome/css/font-awesome.min.css",themify_vars.version)},10)});var N=function(b){function d(){this.$context=b("#tb_lightbox_parent",w.document);this.prefix;this.type;this.group;this.styleTab;this.styleTabId;this.isChanged=this.currentField=null;this.propNames={};this.$liveStyledElmt=null;this.module_rules={};this.rulesCache= {};this.tempData;this.undoData;this.currentStyleObj={};this.currentSheet}d.prototype.init=function(a){this.type=ThemifyConstructor.component;this.group="module"===this.type?f.activeModel.get("mod_name"):this.type;this.prefix=_.isEmpty(f.activeModel.attributes.gs)?ThemifyStyles.getBaseSelector(this.group,f.activeModel.get("element_id")):"."+f.GS.styles[f.activeModel.attributes.gs]["class"];this.$liveStyledElmt=b(u.querySelector(this.prefix));this.currentStyleObj={};this.tempData={};this.undoData={}; this.undoData[f.activeBreakPoint]={};this.tempData[f.activeBreakPoint]={};this.rulesCache[f.activeBreakPoint]||(this.rulesCache[f.activeBreakPoint]={});this.currentSheet=this.getSheet(f.activeBreakPoint);a||("column"!==this.type&&"subrow"!==this.type&&this.bindAnimation(),this.bindTabsSwitch(),this.initModChange())};d.prototype.setCss=function(a,e,c){a=ThemifyStyles.createCss(a,e,void 0,c);e=[];void 0!==themifyBuilder.globalStyles&&void 0==c&&0<Object.keys(themifyBuilder.globalStyles).length&&(a= f.GS.attachCSS(a,[],!0));for(var b in a)if("fonts"===b)for(var g in a[b])c=g,0<a[b][g].length&&(c+=":"+a[b][g].join(",")),e.push(c);else{c=this.getSheet(b);var d=c.cssRules?c.cssRules:c.rules,n;for(n in a[b])!1===this.findIndex(d,n)&&c.insertRule(n+"{"+a[b][n].join("")+";}",d.length)}ThemifyConstructor.font_select.loadGoogleFonts(e.join("|"))};d.prototype.findIndex=function(a,e){for(var c=a.length-1;-1<c;--c)if(e===a[c].selectorText.replace(/\s*>\s*/g,">").replace(/\,\s/g,","))return c;return!1}; d.prototype.setLiveStyle=function(a,e,c){c?"string"===typeof c&&(c=[c]):c=[""];c=ThemifyStyles.getNestedSelector(c);for(var b="",g=this.currentSheet.cssRules?this.currentSheet.cssRules:this.currentSheet.rules,d=0,n=c.length;d<n;++d){var q="h"===this.styleTabId?c[d].endsWith(":after")||c[d].endsWith(":before"):!0;!1===q&&-1===c[d].indexOf(":hover")&&(c[d]+=":hover");b+=this.prefix+c[d];!1===q&&(b+=","+this.prefix+c[d].replace(":hover",".tb_visual_hover"));d!==n-1&&(b+=",")}if(!0===this.isChanged)if("h"=== this.styleTabId)for(n=b.split(","),d=n.length-1;-1<d;--d){if(-1===n[d].indexOf("tb_visual_hover"))for(c=u.querySelectorAll(n[d].split(":hover")[0]),q=c.length-1;-1<q;--q)c[q].classList.add("tb_visual_hover")}else for(this.$liveStyledElmt[0].classList.remove("tb_visual_hover"),c=this.$liveStyledElmt[0].getElementsByClassName("tb_visual_hover"),d=c.length-1;-1<d;--d)c[d].classList.remove("tb_visual_hover");b=b.replace(/\s{2,}/g," ").replace(/\s*>\s*/g,">").replace(/\,\s/g,",");d=p.hash(b);c=e;n=void 0!== this.rulesCache[f.activeBreakPoint][d]?this.rulesCache[f.activeBreakPoint][d]:this.findIndex(g,b);!1===e&&(e="");q=a;if(void 0===this.propNames[a]){var h=a;if(-1!==a.indexOf("-")){var l=a.toLowerCase().split("-");a=l[0]+l[1].charAt(0).toUpperCase()+l[1].slice(1);void 0!==l[2]&&(a+=l[2].charAt(0).toUpperCase()+l[2].slice(1));void 0!==l[3]&&(a+=l[3].charAt(0).toUpperCase()+l[3].slice(1))}this.propNames[h]=a}else a=this.propNames[a];!1!==n&&g[n]?(void 0===this.tempData[f.activeBreakPoint][n]&&(this.tempData[f.activeBreakPoint][n]= {}),void 0===this.tempData[f.activeBreakPoint][n][a]&&(this.tempData[f.activeBreakPoint][n][a]=g[n].style[a]),g[n].style[a]=e):(n=g.length,this.currentSheet.insertRule(b+"{"+q+":"+e+";}",n),void 0===this.tempData[f.activeBreakPoint][n]&&(this.tempData[f.activeBreakPoint][n]={}),this.tempData[f.activeBreakPoint][n][a]="");this.rulesCache[f.activeBreakPoint][d]=n;void 0===this.undoData[f.activeBreakPoint][n]&&(this.undoData[f.activeBreakPoint][n]={});this.undoData[f.activeBreakPoint][n][a]={a:e,b:this.tempData[f.activeBreakPoint][n][a]}; p.body.triggerHandler("tb_"+this.type+"_styling",[this.group,a,e,c,this.$liveStyledElmt])};d.prototype.initModChange=function(a){var b=this;if(!0===a)p.body.off("themify_builder_change_mode.tb_visual_mode");else p.body.on("themify_builder_change_mode.tb_visual_mode",function(a,e,d){void 0===b.tempData[d]&&(b.tempData[d]={});void 0===b.rulesCache[d]&&(b.rulesCache[d]={});void 0===b.undoData[d]&&(b.undoData[d]={});b.currentSheet=b.getSheet(d)})};d.prototype.revertRules=function(){for(var a in this.tempData){var b= this.getSheet(a),b=b.cssRules?b.cssRules:b.rules,c;for(c in this.tempData[a])if(b[c])for(var d in this.tempData[a][c])b[c].style[d]=this.tempData[a][c][d]}this.undoData={};this.tempData={}};d.prototype.getSheet=function(a){return ThemifyStyles.getSheet(a)};d.prototype.reset=function(){this.rulesCache={};this.tempData={};this.undoData={};for(var a=ThemifyConstructor.breakpointsReverse,b=a.length-1;-1<b;--b)for(var c=this.getSheet(a[b]),d=c.cssRules.length-1;-1<d;--d)c.deleteRule(d)};d.prototype.clear= function(){var a=this.$liveStyledElmt[0];a.classList.remove("animated");a.classList.remove("hover-wow");a.classList.remove("tb_visual_hover");this.module_rules={};this.styleTab=this.styleTabId=this.currentField=this.isChanged=null;if(!f.saving&&f.hasChanged)this.revertRules(),this.type&&"module"!==this.type&&(a=f.activeModel.get("styling"))&&"slider"===a.background_type&&a.background_slider&&this.bindBackgroundSlider();else for(var a=a.getElementsByClassName("tb_visual_hover"),b=a.length-1;-1<b;--b)a[b].classList.remove("tb_visual_hover"); this.bindAnimation(!0);this.bindTabsSwitch(!0);this.initModChange(!0);this.undoData={};this.tempData={};this.$liveStyledElmt=this.currentStyleObj=this.currentSheet=null};d.prototype.addOrRemoveFrame=function(a,e){var c=this,d=this.$liveStyledElmt;this.$context.find(c.styleTab);var g="string"===typeof a?a:a.closest(".tb_tab").id.split("_").pop(),m={},n=d.children(".tb_row_frame_"+g);if(void 0===e){var q=this.getValue(g+"-frame_type").selector;for(var h="custom location width height width_unit height_unit repeat type layout color".split(" "), l=0,r=h.length;l<r;++l){var v=w.document.getElementById(g+"-frame_"+h[l]);if("type"===h[l])v=v.querySelector("input:checked").value;else if("layout"===h[l])v=v.getElementsByClassName("selected")[0].id;else if("color"===h[l]){if(v=f.Utils.getColor(v),""===v)continue}else v=v.value;m[h[l]]=v}}else m.location=e;if(m.type===g+"-presets"&&""===m.layout||m.type===g+"-custom"&&""===m.custom)c.setLiveStyle("backgroundImage","",q),n.remove(),void 0===themifyBuilder.globalStyleData&&f.GS.addFrame();else{if(0=== n.length){if(n=u.createElement("div"),n.className="tb_row_frame tb_row_frame_"+g+" "+m.location,d.children(".tb_action_wrap").after(n),void 0!==e)return}else n.removeClass("behind_content in_front").addClass(m.location);m.type===g+"-presets"?b.ajax({dataType:"text",url:tbLocalScript.builder_url+"/img/row-frame/"+("left"===g||"right"===g?m.layout+"-l":m.layout)+".svg",success:function(a){m.color&&(a=a.replace(/\#D3D3D3/ig,m.color));c.setLiveStyle("backgroundImage",'url("data:image/svg+xml;base64,'+ btoa(a)+'")',q)}}):c.setLiveStyle("backgroundImage",'url("'+m.custom+'")',q);c.setLiveStyle("width",m.width?m.width+m.width_unit:"",q);c.setLiveStyle("height",m.height?m.height+m.height_unit:"",q);m.repeat?"left"===g||"right"===g?c.setLiveStyle("backgroundSize","100% "+100/m.repeat+"%",q):c.setLiveStyle("backgroundSize",100/m.repeat+"% 100%",q):c.setLiveStyle("backgroundSize","",q)}};d.prototype.overlayType=function(a){var b="color"===a||"hover_color"===a,c=b?"minicolors-input":"themify-gradient-type"; a=this.styleTab.getElementsByClassName("tb_group_element_"+a)[0].getElementsByClassName(c)[0];b?((b=a.value)&&(b=f.Utils.getColor(a)),p.triggerEvent(a,"themify_builder_color_picker_change",{val:b})):p.triggerEvent(a,"change")};d.prototype.addOrRemoveComponentOverlay=function(a,b,c){var d=this.getComponentBgOverlay(),d=0!==d.length;b=this.getValue(b);var e=b.selector;"h"===this.styleTabId?this.$liveStyledElmt[0].classList.add("tb_visual_hover"):this.$liveStyledElmt[0].classList.remove("tb_visual_hover"); ""===c?(this.setLiveStyle("backgroundImage","",e),this.setLiveStyle("backgroundColor","",e)):(d||(d=u.createElement("div"),d.className="builder_row_cover",this.$liveStyledElmt.children(".tb_action_wrap").before(d)),b&&("color"===a?this.setLiveStyle("backgroundImage","none",e):this.setLiveStyle("backgroundColor",!1,e),this.setLiveStyle(b.prop,c,e)))};d.prototype.bindMultiFields=function(a,d){function c(a,c){if(!1===q&&!1===n){if("row"===e.type&&""===tbLocalScript.fullwidth_support&&(h&&("padding"=== c||"margin"===c)||"padding-left"===c||"padding-right"===c||"margin-left"===c||"margin-right"===c)){var d=c.split("-"),g=f.activeBreakPoint+"-"+d[0];if(h)a=a+","+a;else{var k=e.$liveStyledElmt.data(g),k=k?k.split(","):[];"left"===d[1]?k[0]=a:k[1]=a;a=k.join(",")}e.$liveStyledElmt.attr("data-"+g,a).data(g,a);ThemifyBuilderModuleJs.setupFullwidthRows(e.$liveStyledElmt)}(h&&"padding"===c||0===c.indexOf("padding"))&&setTimeout(function(){b(t).triggerHandler("tfsmartresize.tfVideo")},600)}}var e=this;if(d= e.getValue(a.id)){var g=a.closest(".tb_seperate_items");var m=d.prop.split("-");var n=void 0!==m[3];var q=!1===n&&"border"===m[0];var h=g.hasAttribute("data-checked");g=g.getElementsByClassName("tb_multi_field");var l=function(a){if(!0===q){var c=a.closest("li");a=parseFloat(c.getElementsByClassName("border_width")[0].value.trim());var b=c.getElementsByClassName("border_style")[0].value;c=f.Utils.getColor(c.getElementsByClassName("minicolors-input")[0]);b="none"===b?b:isNaN(a)||""===a||""===c?"": a+"px "+b+" "+c}else b=a.value.trim(),""!==b&&(b=parseFloat(b),b=isNaN(b)?"":b+a.closest(".tb_input").querySelector("#"+a.id+"_unit").value);return b},r=!0===h?l(a):null;m=m[0];for(var u=g.length-1;-1<u;--u)!1===h&&(r=l(g[u])),m=e.getValue(g[u].id).prop,e.setLiveStyle(m,r,d.selector),c(r,m);!1===q&&(f.ActionBar.hoverCid=null);g=null}};d.prototype.bindRowWidthHeight=function(a,d,c){c||(c=this.$liveStyledElmt);"row_height"===a?"fullheight"===d?c[0].classList.add(d):c[0].classList.remove("fullheight"): "fullwidth"===d?(c.removeClass("fullwidth").addClass("fullwidth_row_container"),ThemifyBuilderModuleJs.setupFullwidthRows(c)):"fullwidth-content"===d?(c.removeClass("fullwidth_row_container").addClass("fullwidth"),ThemifyBuilderModuleJs.setupFullwidthRows(c)):c.removeClass("fullwidth fullwidth_row_container").css({"margin-left":"","margin-right":"","padding-left":"","padding-right":"",width:""});b(t).triggerHandler("tfsmartresize.tfVideo")};d.prototype.bindAnimation=function(a){var d=this;if(!0=== a)this.$context.off("change.tb_animation");else this.$context.on("change.tb_animation","#animation_effect,#animation_effect_delay,#animation_effect_repeat,#hover_animation_effect",function(){var a="hover_animation_effect"===this.id,e=a?"hover_animation_effect":"animation_effect",g=a?b(this).val():d.$context.find("#animation_effect").val(),f=void 0!==d.currentStyleObj[e]?d.currentStyleObj[e]:ThemifyConstructor.values[e],n=d.$liveStyledElmt;f&&(a&&(f=f+" hover-wow hover-animation-"+f),n.removeClass(f+ " wow").css({"animation-name":"","animation-delay":"","animation-iteration-count":""}));n.removeClass("animated tb_hover_animate");if(d.currentStyleObj[e]=g)a?g="hover-wow hover-animation-"+g:(e=parseFloat(d.$context.find("#animation_effect_delay").val()),f=parseInt(d.$context.find("#animation_effect_repeat").val()),n.css({"animation-delay":0<e&&!isNaN(e)?e+"s":"","animation-iteration-count":0<f&&!isNaN(f)?f:""})),setTimeout(function(){n.addClass(g+" animated");a&&n.trigger("mouseover")},1)})};d.prototype.getRowAnchorClass= function(a){return 0<a.length?"tb_section-"+a:""};d.prototype.getStylingVal=function(a){return void 0!==this.currentStyleObj[a]?this.currentStyleObj[a]:""};d.prototype.setStylingVal=function(a,b){this.currentStyleObj[a]=b};d.prototype.bindBackgroundMode=function(a,b){var c={repeat:"repeat","repeat-x":"repeat-x","repeat-y":"repeat-y","repeat-none":"no-repeat","no-repeat":"no-repeat",fullcover:"cover","best-fit-image":"contain","builder-parallax-scrolling":"cover","builder-zoom-scrolling":"100%","builder-zooming":"100%"}; if(void 0!==c[a]){var d={},e=this.getValue(b),f=w.document.getElementById(e.origId);null!==f&&""===f.value.trim()?(a=null,d={"background-repeat":"","background-size":"","background-position":"","background-attachment":""}):-1!==a.indexOf("repeat")?(d["background-repeat"]=c[a],d["background-size"]="auto"):(d["background-size"]=c[a],d["background-repeat"]="no-repeat","best-fit-image"===c[a]||"builder-zooming"===c[a]?d["background-position"]="center center":"builder-zoom-scrolling"===c[a]&&(d["background-position"]= "50%"));this.$liveStyledElmt[0].classList.remove("builder-parallax-scrolling");this.$liveStyledElmt[0].classList.remove("builder-zooming");this.$liveStyledElmt[0].classList.remove("builder-zoom-scrolling");this.$liveStyledElmt[0].style.backgroundSize=this.$liveStyledElmt[0].style.backgroundPosition="";"builder-parallax-scrolling"===a?this.$liveStyledElmt[0].classList.add("builder-parallax-scrolling"):"builder-zooming"===a?this.$liveStyledElmt[0].classList.add("builder-zooming"):"builder-zoom-scrolling"=== a&&this.$liveStyledElmt[0].classList.add("builder-zoom-scrolling");for(var n in d)this.setLiveStyle(n,d[n],e.selector);"builder-zoom-scrolling"===a?ThemifyBuilderModuleJs.backgroundZoom(this.$liveStyledElmt):"builder-zooming"===a?ThemifyBuilderModuleJs.backgroundZooming(this.$liveStyledElmt):"builder-parallax-scrolling"===a&&ThemifyBuilderModuleJs.backgroundScrolling(this.$liveStyledElmt)}};d.prototype.bindBackgroundPosition=function(a,b){if(a&&0<a.length){var c=this.getValue(b);c&&this.setLiveStyle(c.prop, a.replace("-"," "),c.selector)}};d.prototype.bindBackgroundSlider=function(a){function d(a){a=b(a);var d=c.getComponentBgOverlay();0<d.length?d.after(a):c.$liveStyledElmt.prepend(a);ThemifyBuilderModuleJs.backgroundSlider(a[0].parentNode)}var c=this;a=c.$context.find("#"+a.id).val().trim();c.removeBgSlider();if(a){void 0===this.cahce&&(this.cahce={});a={shortcode:encodeURIComponent(a),mode:c.$context.find("#background_slider_mode").val(),speed:c.$context.find("#background_slider_speed").val(),size:c.$context.find("#background_slider_size").val()}; var f="",g;for(g in a)f+=p.hash(g+a[g]);void 0!==this.cahce[f]?d(this.cahce[f]):(a.type=c.type,b.post(themifyBuilder.ajaxurl,{nonce:themifyBuilder.tb_load_nonce,action:"tb_slider_live_styling",tb_background_slider_data:a},function(a){10>a.length||(c.cahce[f]=a,d(a))}))}};d.prototype.VideoOptions=function(a,b){var c=this.$liveStyledElmt.find(".big-video-wrap").first(),d=!0===a.checked,e="";void 0!==c[0]&&(c[0].classList.contains("themify_ytb_wrapper")?(c=this.$liveStyledElmt,e="ytb"):c[0].classList.contains("themify-video-vmieo")? (c=$f(c.children("iframe")[0]))&&(e="vimeo"):(c=this.$liveStyledElmt.data("plugin_ThemifyBgVideo"),e="local"),"mute"===b?d?("ytb"===e?c.ThemifyYTBMute():"vimeo"===e?c.api("setVolume",0):"local"===e&&c.muted(!0),this.$liveStyledElmt.data("mutevideo","mute")):("ytb"===e?c.ThemifyYTBUnmute():"vimeo"===e?c.api("setVolume",1):"local"===e&&c.muted(!1),this.$liveStyledElmt.data("mutevideo","")):"unloop"===b&&(d?("vimeo"===e?c.api("setLoop",0):"local"===e&&c.loop(!1),this.$liveStyledElmt.data("unloopvideo", "")):("vimeo"===e?c.api("setLoop",1):"local"===e&&c.loop(!0),this.$liveStyledElmt.data("unloopvideo","loop"))))};d.prototype.bindBackgroundTypeRadio=function(a){var b="tb_uploader_input";"module"!==this.type&&("slider"!==a?"n"===this.styleTabId&&this.removeBgSlider():b="tb_shortcode_input","video"!==a&&"n"===this.styleTabId&&this.removeBgVideo());"gradient"!==a?this.setLiveStyle("backgroundImage","none"):b="themify-gradient-type";var c=this.styleTab.getElementsByClassName("tb_group_element_"+a)[0]; p.triggerEvent(c.getElementsByClassName(b)[0],"change");"image"===a&&"module"===this.type&&(b=c.getElementsByClassName("minicolors-input")[0],void 0!==b&&p.triggerEvent(b,"themify_builder_color_picker_change",{val:b.value}))};d.prototype.bindFontColorType=function(a,b,c){if("radio"===c)if(b=-1!==a.indexOf("_solid"),c=!0===b?a.replace(/_solid$/ig,""):a.replace(/_gradient$/ig,"-gradient-type"),c=w.document.getElementById(c),!0===b){a=f.Utils.getColor(c);if(void 0===a||""===a)a="inherit";p.triggerEvent(c, "themify_builder_color_picker_change",{val:a})}else p.triggerEvent(c,"change");else{b=this.getValue(b).selector;if("color"===c){if(this.setLiveStyle("WebkitBackgroundClip","border-box",b),this.setLiveStyle("backgroundClip","border-box",b),this.setLiveStyle("backgroundImage","none",b),void 0===a||""===a)a="inherit"}else""!==a&&(c="backgroundImage",this.setLiveStyle("color","transparent",b),this.setLiveStyle("WebkitBackgroundClip","text",b),this.setLiveStyle("backgroundClip","text",b));""===a&&"color"!== c||this.setLiveStyle(c,a,b)}};d.prototype.shadow=function(a,b,c){if(b=this.getValue(b)){a=a.closest(".tb_seperate_items").getElementsByClassName("tb_shadow_field");for(var d=c="",e=0,m=a.length;e<m;++e)if(a[e].classList.contains("tb-checkbox"))c=a[e].checked?"inset ":"";else{var n=a[e].value.trim();"color"===ThemifyConstructor.styles[a[e].id].type?n=f.Utils.getColor(a[e]):(n=""!==n?n:0,n+=a[e].closest(".tb_input").querySelector("#"+a[e].id+"_unit").value);d+=n+" "}this.setLiveStyle(b.prop,c+d,b.selector)}}; d.prototype.filters=function(a,b){for(var c=a.closest(".tb_filters_fields").getElementsByClassName("tb_filters_field"),d="",e,f=0,n=c.length;f<n;++f){var q=c[f].value.trim();""!==q&&(e=this.getValue(c[f].id),q+=c[f].closest(".tb_seperate_items").querySelector("#"+c[f].id+"_unit").textContent,q="hue"===e.prop?"hue-rotate("+q+")":e.prop+"("+q+")",d+=q+" ")}e=this.getValue(b);this.setLiveStyle("filter",d,e.selector)};d.prototype.setData=function(a,b,c){if(a=this.getValue(a))""===b&&(b=a.prop),this.setLiveStyle(b, c,a.selector)};d.prototype.bindEvents=function(a,d){if(!a.classList.contains("style_apply_all")){var c=this;(function(){var e=d.type,g=d.prop,m=d.id;var n="color"===e?"themify_builder_color_picker_change":"gradient"===e?"themify_builder_gradient_change":"text"===e||"range"===e?"keyup":"change";a.addEventListener(n,function(a){var h=this.classList,k="SELECT"===this.tagName,l=!k&&"radio"===this.type;if(c.currentField!==this.id||""===c.currentField){c.currentField="radio"===this.type?!1:this.id;c.isChanged= !0;c.styleTab=null;c.styleTabId="n";var q=this.closest(".tb_tab");null===q?(q=this.closest(".tb_expanded_opttions"),null===q&&(q=w.document.getElementById("tb_options_styling"))):c.styleTabId=q.id.split("_").pop();c.styleTab=q}else c.isChanged=!1;f.hasChanged=!0;a=a.detail&&a.detail.val?a.detail.val:"frame"===e?this.id:this.value;a=void 0!==a?a.trim():"";if("color"===e&&h.contains("border_color")||!0===k&&h.contains("border_style")||"keyup"===n&&(h.contains("border_width")||h.contains("tb_multi_field")))c.bindMultiFields(this); else if("frame-custom"===g||"frame"===e||h.contains("tb_frame"))c.addOrRemoveFrame(this);else if(h.contains("tb_shadow_field"))c.shadow(this,m);else if(h.contains("tb_filters_field"))c.filters(this,m);else if("keyup"===n)""!==a&&("column-rule-width"===g?(a+="px",h=m.replace("_width","_style"),k=w.document.getElementById(h),null!==k&&c.setData(h,"",k.value)):"column-gap"===g?a+="px":(h=w.document.getElementById(m+"_unit"),null!==h&&(a+=h.value?h.value:"px"))),c.setData(m,"",a);else if(!0===d.isFontColor)c.bindFontColorType(a, m,e);else{if(!0===k)if("font-weight"===g)h=this.dataset.selected,""!==h&&"default"!==h&&void 0===ThemifyConstructor.font_select.safe[h]&&ThemifyConstructor.font_select.loadGoogleFonts(h+":"+a),h=c.styleTab.getElementsByClassName("tb_multi_fonts")[0],-1!==a.indexOf("italic")?(a=parseInt(a.replace("italic","")),h=h.querySelector('[value="italic"]')):h=h.querySelector('[value="normal"]'),!1===h.checked&&h.parentNode.click();else if("font_select"===e)""!==a&&"default"!==a&&void 0===ThemifyConstructor.font_select.safe[a]? (h=this.closest(".tb_tab").getElementsByClassName("font-weight-select")[0],k=a,void 0!==h&&(k+=":"+h.value),ThemifyConstructor.font_select.loadGoogleFonts(k)):"default"===a&&(a="");else{if(h.contains("tb_unit")){p.triggerEvent(c.$context.find("#"+m.replace("_unit",""))[0],"keyup");return}if("background-mode"===g){c.bindBackgroundMode(a,m);return}if("background-position"===g){c.bindBackgroundPosition(a,m);return}"column-count"===g&&0==a&&(a="")}else{if("gallery"===e&&"module"!==c.type){c.bindBackgroundSlider(d); return}if(!0===l){m=this.closest(".tb_lb_option").id;!1===this.checked&&(a="");if("imageGradient"===e||!0===d.is_background){c.bindBackgroundTypeRadio(a);return}if(!0===d.is_overlay){c.overlayType(a);return}}else if("color"===e||"gradient"===e){"gradient"===e&&(m=this.dataset.id);if(!0===d.is_overlay){c.addOrRemoveComponentOverlay(e,m,a);return}"color"===e&&(h=null,"module"===c.type&&void 0!==d.colorId&&void 0!==d.origId?(h=w.document.getElementById(d.origId),null!==h&&"image"!==h.closest(".tb_input").querySelector("input:checked").value&& (h=null)):"module"!==c.type&&"h"===c.styleTabId&&(h=c.styleTab.getElementsByClassName("tb_uploader_input")[0]),h&&""===h.value.trim()&&c.setLiveStyle("background-image",""!==a?"none":"",d.selector))}else if("image"===e||"video"===e){if("video"===e)return 0<a.length?(c.$liveStyledElmt.data("fullwidthvideo",a).attr("data-fullwidthvideo",a),_.isEmpty(c.$liveStyledElmt.data("mutevideo"))&&c.$context.find("#background_video_options_mute").is(":checked")&&c.$liveStyledElmt.data("mutevideo","mute"),ThemifyBuilderModuleJs.fullwidthVideo(c.$liveStyledElmt)): c.removeBgVideo(),!1;a?a="url("+a+")":(a="",void 0!==d.colorId&&"h"===c.styleTabId&&(h=w.document.getElementById(d.colorId),null!==h&&""!==h.value.trim()&&(a="none")));h=c.styleTab.getElementsByClassName("tb_image_options");for(k=h.length-1;-1<k;--k)for(l=h[k].getElementsByClassName("tb_lb_option"),q=l.length-1;-1<q;--q)p.triggerEvent(l[q],"change")}else if("checkbox"===e){if(null!==this.closest("#background_video_options")){c.VideoOptions(this,a);return}if("height"===g&&-1!==m.indexOf("_auto_height")|| "width"===g&&-1!==m.indexOf("_auto_width")){a="height"===g?d.heightID:d.widthID;this.checked?c.setData(a,g,"auto"):(h=c.styleTab.querySelector("#"+a).value.trim(),""!==h?c.setData(a,g,h+b(c.styleTab).find("#"+a+"_unit").val()):c.setData(a,g,""));return}}}c.setData(m,"",a)}},{passive:!0})})()}};d.prototype.getValue=function(a){return void 0!==this.module_rules[a]?this.module_rules[a]:!1};d.prototype.bindTabsSwitch=function(a){var b=this;if(!0===a)p.body.off("themify_builder_tabsactive.hoverTabs"); else p.body.on("themify_builder_tabsactive.hoverTabs",function(a,d,e){if("styling"===ThemifyConstructor.clicked)if("h"!==d.split("_").pop()){b.$liveStyledElmt[0].classList.remove("tb_visual_hover");var c=b.$liveStyledElmt[0].getElementsByClassName("tb_visual_hover");for(a=c.length-1;-1<a;--a)c[a].classList.remove("tb_visual_hover")}else"module"!==b.type&&(a=e.previousElementSibling.getElementsByClassName("background_type")[0],void 0!==a&&(a=a.querySelector("input:checked").value,"image"===a||"gradient"=== a?e.classList.remove("tb_disable_hover"):e.classList.add("tb_disable_hover"))),setTimeout(function(){c=e.getElementsByClassName("tb_lb_option");for(var a=[],d=c.length-1;-1<d;--d){var f=c[d].id,g=c[d].classList.contains("themify-gradient");!0===g&&(f=c[d].dataset.id);if(void 0!==b.module_rules[f]&&(g||null!==c[d].offsetParent))for(void 0!==b.module_rules[f].is_overlay&&b.$liveStyledElmt[0].classList.add("tb_visual_hover"),f=Array.isArray(b.module_rules[f].selector)?b.module_rules[f].selector:[b.module_rules[f].selector], g=f.length-1;-1<g;--g){var k=f[g].split(":hover")[0];a[k]=1}}c=null;a=Object.keys(a);if(0<a.length)for(d=a.length-1;-1<d;--d)for(c=u.querySelectorAll(b.prefix+a[d]),g=c.length-1;-1<g;--g)c[g].classList.add("tb_visual_hover")},10)})};d.prototype.getComponentBgOverlay=function(){return this.$liveStyledElmt.children(".builder_row_cover")};d.prototype.getComponentBgSlider=function(){var a="colum"===this.type&&"sub-column"===f.activeModel.get("component_name")?"sub-col":"colum"===this.type?"col":this.type; return this.$liveStyledElmt.children("."+a+"-slider")};d.prototype.removeBgSlider=function(){this.getComponentBgSlider().add(this.$liveStyledElmt.children(".tb_backstretch")).remove();this.$liveStyledElmt.css({position:"",background:"","z-index":""})};d.prototype.removeBgVideo=function(){this.$liveStyledElmt.removeAttr("data-fullwidthvideo").data("fullwidthvideo","").children(".big-video-wrap").remove()};return d}(jQuery);f.EdgeDrag={modules:null,oneTag:["AREA","EMBED","IMG","INPUT"],disableDrag:null, liveinstance:null,init:function(){f.Instances.Builder[f.builderIndex].el.addEventListener("mousedown",this.drag.bind(this))},addEdgesOptions:function(b){var d=b.closest(".tb_dragger");if(void 0===d.getElementsByClassName("tb_dragger_lightbox")[0]){b=d.classList.contains("tb_dragger_margin")?"margin":"padding";var a=["px","em","%"],e=["opposite","all"],c=d.parentNode.children,k=l(d).closest("[data-cid]")[0].getAttribute("data-cid"),g=null,m=null,n=null,q=this,k=f.Models.Registry.lookup(k),h=k.get("elType"), E="module"===h?k.get("mod_settings"):k.get("styling"),h="margin"===b&&("column"===h||"row"===h);d=null;for(var r=c.length-1;-1<r;--r)if(c[r].classList.contains("tb_dragger_"+b)){var v=u.createElement("div"),t=u.createElement("ul"),F=u.createElement("ul"),C=u.createDocumentFragment(),y=c[r].getElementsByClassName("tb_dragger_options")[0],D=c[r].getAttribute("data-id"),G=c[r].classList.contains("tb_dragger_top")||c[r].classList.contains("tb_dragger_bottom")?"s":"e",H=c[r].getAttribute("data-u");v.className= "tb_dragger_lightbox";F.className="tb_dragger_units";t.className="tb_dragger_types";!0===h&&(t.className+=" tb_dragger_hide_apply_all");for(var x=0,M=a.length;x<M;++x)d=u.createElement("li"),d.textContent=a[x],a[x]===H&&(d.className="current"),C.appendChild(d);null===g&&(g=D.replace(/_left|_right|_bottom|_top$/ig,""),m=this.getCurrentStyling(E,"checkbox_"+g+"_apply_all",k));null===n&&c[r].getAttribute("data-v")&&(n=1);x=0;for(M=e.length;x<M;++x)d=u.createElement("li"),D=u.createElement("span"),H= !1,d.className="opposite"===e[x]?"tb_apply_opposite":"tb_apply_all",d.className+=" tb_apply","opposite"===e[x]?m||(H=this.getCurrentStyling(E,"s"===G?g+"_opp_top":g+"_opp_left",k)):H=m,H&&(d.className+=" current"),d.appendChild(D),t.appendChild(d);F.appendChild(C);v.appendChild(F);v.appendChild(t);y.appendChild(v);y.getElementsByClassName("tb_dragger_arrow")[0].addEventListener("click",function(a){a.preventDefault();a.stopPropagation();!0!==f.ActionBar.isHoverMode?f.ActionBar.el.classList.remove("tb_show_toolbar"): (a=p.body[0].getElementsByClassName("tb_clicked"),a.length&&(a[0].style.display="none"));var b=this.closest(".tb_dragger");b.classList.add("tb_dragger_focus");u.body.classList.add("tb_dragger_options_open");var c=function(a){if(!0!==f.ActionBar.isHoverMode)f.ActionBar.el.classList.add("tb_show_toolbar");else{var d=p.body[0].getElementsByClassName("tb_clicked");d.length&&(d[0].style.display="block")}if("mouseout"===a.type||!a.target.classList.contains("tb_dragger_lightbox")&&!a.target.parentNode.classList.contains("tb_dragger_lightbox"))a.stopPropagation(), a.preventDefault(),u.removeEventListener("click",c),w.document.removeEventListener("click",c),b.removeEventListener("mouseleave",c,{once:!0}),b.classList.contains("tb_dragger_padding")&&b.classList.contains("tb_dragger_top")&&q.setModulePosition(b),b.classList.remove("tb_dragger_focus"),u.body.classList.remove("tb_dragger_options_open"),b=null};b.addEventListener("mouseleave",c,{once:!0});u.addEventListener("click",c);w.document.addEventListener("click",c)})}if(null===n&&m){for(r=c.length-1;-1<r;--r)c[r].classList.contains("tb_dragger_"+ b)&&c[r].getElementsByClassName("tb_apply_all")[0].classList.remove("current");this.setData(k,"checkbox_"+g+"_apply_all",!1)}}},clearEdges:function(){for(var b=f.Instances.Builder[0].el.getElementsByClassName("tb_dragger"),d=b.length-1;-1<d;--d)b[d].parentNode.removeChild(b[d])},addGutters:function(b,d){},getTabId:function(b,d,a){for(var e in b)if(void 0!==b[e].options)for(var c=b[e].options.length-1;-1<c;--c)if(b[e].options[c].label===a&&"expand"===b[e].options[c].type){var f=b[e].options[c].options; if(void 0!==f)for(var g=f.length-1;-1<g;--g)if(void 0!==f[g].options&&void 0!==f[g].options.n)for(var m=f[g].options.n.options,l=m.length-1;-1<l;--l)if(m[l].id===d)return e}return null},addEdges:function(b,d,a,e,c){!0!==c&&this.clearEdges();if("divider"!==b){c="row"===b||"column"===b||"subrow"===b?d.get("styling"):d.get("mod_settings");var k=["padding","margin"];var g=["top","left","bottom","right"];u.createDocumentFragment();for(var m=g.length,l=this.oneTag.length,q={},h=k.length-1;-1<h;--h)if(void 0!== this.modules[b]&&void 0!==this.modules[b][k[h]])for(var p in this.modules[b][k[h]])q[p]={s:this.modules[b][k[h]][p],t:k[h]};else q[k[h]]={s:"",t:k[h]};for(var r in q){k=u.createDocumentFragment();p=q[r].t;var h=r.replace("_"+g[h],""),v=this.getCurrentStyling(c,"checkbox_"+h+"_apply_all",d);if(v){var t=this.getCurrentStyling(c,h+"_top",d);var w=this.getCurrentStyling(c,h+"_top_unit",d)||"px";if(void 0===t||null===t)t=""}else v=!1;for(h=m-1;-1<h;--h)if("margin"!==p||"column"!==b&&"row"!==b||"right"!== g[h]&&"left"!==g[h]){var C=u.createElement("div"),y=u.createElement("div"),D=u.createElement("span"),G=u.createElement("span"),H=p+"-"+g[h],x="margin"!==p||"column"!==b&&"row"!==b?r+"_"+g[h]:H;!1===v&&(t=this.getCurrentStyling(c,x,d),w=this.getCurrentStyling(c,x+"_unit",d)||"px",void 0===t||null===t)&&(t="");D.className="tb_dragger_value";G.className="tb_dragger_arrow";y.className="tb_dragger_options";C.setAttribute("data-v",t);C.setAttribute("data-u",w);C.setAttribute("data-id",x);C.setAttribute("data-prop", H);""!==t&&(D.textContent=t+w);C.className="tb_dragger tb_disable_sorting tb_dragger_"+g[h]+" tb_dragger_"+p;"%"!==w&&this.setValueByType(C);y.appendChild(D);y.appendChild(G);C.appendChild(y);k.appendChild(C)}v=""===q[r].s?[a]:a.querySelectorAll(q[r].s);for(h=v.length-1;-1<h;--h){y=v[h].tagName;C=null;D=v[h];if("DIV"===y||"SPAN"===y||"A"===y)D.classList.add("tb_has_edge"),D.appendChild(k);else{G=null;for(p=l-1;-1<p;--p)if(this.oneTag[p]===y){D=v[h].parentNode;D.classList.add("tb_has_edge");D.appendChild(k); G=!0;C=v[h].offsetWidth;break}null===G&&(D.classList.add("tb_has_edge"),D.appendChild(k))}y=D.children;for(p=y.length-1;-1<p;--p)"%"===y[p].getAttribute("data-u")&&this.setValueByType(y[p]),null!==C&&(y[p].classList.contains("tb_dragger_top")||y[p].classList.contains("tb_dragger_bottom"))&&(y[p].style.width=C+"px")}}"row"!==b&&(d=null,"column"===b?"module"!==e&&(d=a.classList.contains("sub_column")?a.closest(".module_subrow"):a.closest(".module_row")):d="subrow"===b||"module"===e||a.classList.contains("tb_module_front")? a.closest(".module_column"):a.closest(".tb_module_front"),null!==d&&(void 0===e&&(e="row"!==b&&"column"!==b&&"subrow"!==b?"module":null),b=f.Models.Registry.lookup(d.getAttribute("data-cid")),a=b.get("elType"),"module"===a&&(a=b.get("mod_name")),this.addEdges(a,b,d,e,!0)))}},optionsClick:function(b){f.ActionBar.disable=!0;b.preventDefault();b.stopPropagation();this.addEdgesOptions(b.target.closest(".tb_dragger_options"));b="LI"===b.target.nodeName?b.target:b.target.parentNode;"LI"===b.nodeName&&(!b.classList.contains("current")&& b.parentNode.classList.contains("tb_dragger_units")?this.changeUnit(b):b.parentNode.classList.contains("tb_dragger_types")&&this.changeApply(b));f.ActionBar.disable=null},changeUnit:function(b){var d=b.closest(".tb_dragger_lightbox").closest(".tb_dragger"),a=d.classList.contains("tb_dragger_padding")?"padding":"margin",e=d.classList.contains("tb_dragger_top")||d.classList.contains("tb_dragger_bottom")?"s":"e",c=d.getElementsByClassName("tb_dragger_types")[0].getElementsByClassName("current")[0];b= b.textContent;var k=d.parentNode,g=k.getAttribute("data-cid"),m=k.children,c=void 0===c?!1:c.classList.contains("tb_apply_all")?"all":"opposite";g||(g=l(k).closest("[data-cid]")[0].getAttribute("data-cid"));k=f.Models.Registry.lookup(g);g=k.get("elType");"module"===g&&(g=k.get("mod_name"));g=this.getSelector(g,a,d.getAttribute("data-id").replace(/_left|_right|_bottom|_top$/ig,""));u.body.classList.add("tb_dragger_drag");d.classList.add("tb_dragger_dragged");for(var n=m.length-1;-1<n;--n)if(m[n].classList.contains("tb_dragger_"+ a)){if("opposite"===c){if(!("s"===e&&(m[n].classList.contains("tb_dragger_top")||m[n].classList.contains("tb_dragger_bottom"))||"e"===e&&(m[n].classList.contains("tb_dragger_left")||m[n].classList.contains("tb_dragger_right"))))continue}else if("all"!==c&&m[n]!==d)continue;var q=m[n].getAttribute("data-v"),h=""!==q?this.convert(a,m[n],m[n].getAttribute("data-u"),b,q):"",q=m[n].getElementsByClassName("tb_dragger_units")[0].children;m[n].setAttribute("data-v",h);m[n].setAttribute("data-u",b);this.setLivePreview(k, m[n].getAttribute("data-prop"),h+b,g);this.setData(k,m[n].getAttribute("data-id"),h,b);this.setValueByType(m[n]);m[n].getElementsByClassName("tb_dragger_value")[0].textContent=""===h?"":h+b;for(h=q.length-1;-1<h;--h)q[h].textContent===b?q[h].classList.add("current"):q[h].classList.remove("current")}setTimeout(function(){for(var a=m.length-1;-1<a;--a)m[a].classList.remove("tb_dragger_dragged");u.body.classList.remove("tb_dragger_drag")},500)},changeApply:function(b){var d=b.classList.contains("tb_apply_all")? "all":"opposite",a=b.classList.contains("current"),e=b.closest(".tb_dragger");b=!1===a?e.getElementsByClassName("tb_apply_all")[0].classList.contains("current"):null;var c=e.parentNode,k=c.children,g=e.getAttribute("data-id").replace(/_left|_right|_bottom|_top$/ig,""),m=e.getAttribute("data-v"),n=e.getAttribute("data-u"),q=e.classList.contains("tb_dragger_padding")?"padding":"margin",e=e.classList.contains("tb_dragger_top")||e.classList.contains("tb_dragger_bottom")?"s":"e",h=I.clone(c),p=c.getAttribute("data-cid"); p||(p=l(c).closest("[data-cid]")[0].getAttribute("data-cid"));var r=f.Models.Registry.lookup(p),c=l.extend(!0,{},r.get("module"===r.get("elType")?"mod_settings":"styling"));"all"===d?(this.setData(r,"checkbox_"+g+"_apply_all",!1===a?"1":!1),!1===a&&(this.setData(r,g+"_opp_left",!1),this.setData(r,g+"_opp_top",!1))):(this.setData(r,"checkbox_"+g+"_apply_all",!1),this.setData(r,"s"===e?g+"_opp_top":g+"_opp_left",!1===a?"1":!1));for(g=k.length-1;-1<g;--g)if(k[g].classList.contains("tb_dragger_"+q)){r= k[g].getElementsByClassName("tb_dragger_lightbox")[0];r.parentNode.removeChild(r);this.addEdgesOptions(k[g]);!0===a&&(n||(n="px"),null===m||void 0===m)&&(m="");if("all"===d||!0===b)k[g].setAttribute("data-v",m),k[g].setAttribute("data-u",n);if("all"!==d)if("s"===e&&(k[g].classList.contains("tb_dragger_top")||k[g].classList.contains("tb_dragger_bottom"))||"e"===e&&(k[g].classList.contains("tb_dragger_left")||k[g].classList.contains("tb_dragger_right")))k[g].setAttribute("data-v",m),k[g].setAttribute("data-u", n);else continue;for(var r=k[g].getElementsByClassName("tb_dragger_units")[0].children,u,t=r.length-1;-1<t;--t)r[t].textContent===n?(r[t].classList.add("current"),u=r[t]):r[t].classList.remove("current");this.changeUnit(u)}this.onChange();null!==f.activeModel&&f.activeModel.cid===p||this.addUndo(h,c)},setValueByType:function(b){var d=b.getAttribute("data-prop"),a=b.classList.contains("tb_dragger_margin")?"margin":"padding",e=b.getAttribute("data-v"),c=b.getAttribute("data-u");"%"===c&&(e=this.getRealPercent(b, e),c="px");"padding"===a?b.style[d]=""===e?"":e+c:""===e?b.style.height=b.style.width=b.style[d]="":(a=b.classList.contains("tb_dragger_top")||b.classList.contains("tb_dragger_bottom")?"height":"width",b.style[a]=(0<e?e:-e)+c,b.style[d]=-e+c)},getRealPercent:function(b,d){return parseFloat(d*b.closest(".tb_has_edge").parentNode.offsetWidth/100)},convert:function(b,d,a,e,c){if(0==c)return 0;if(a===e)return c;var f;d=d.closest(".tb_has_edge");b="em"===e||"em"===a?parseFloat(t.getComputedStyle(d).fontSize): null;d="%"===e||"%"===a?d.parentNode.offsetWidth:null;"px"===a?"em"===e?f=+parseFloat(c/b).toFixed(2):"%"===e&&(f=parseInt(100*c/d)):"%"===a?(f=parseFloat(c*d/100),f="em"===e?+parseFloat(f/b).toFixed(2):parseInt(f)):(f=parseFloat(c*b),"%"===e&&(f=parseFloat(100*f/d)),f=parseInt(f));return f},getCurrentStyling:function(b,d,a){var e=null;if(null!==f.activeModel&&f.activeModel.cid===a.cid){var c=I.Lightbox.$lightbox[0].querySelector("#"+d);null!==c&&(c.classList.contains("themify-checkbox")?(c=c.getElementsByClassName("tb-checkbox")[0], void 0!==c&&(e=!0===c.checked?c.value:!1)):e=c.value)}if(null===e){var c=f.activeModel,k=ThemifyConstructor.values,g=ThemifyConstructor.clicked;f.activeModel=a;ThemifyConstructor.clicked="styling";ThemifyConstructor.values=b;e=ThemifyConstructor.getStyleVal(d);f.activeModel=c;ThemifyConstructor.clicked=g;ThemifyConstructor.values=k}return e},setData:function(b,d,a,e){var c="module"===b.get("elType")?"mod_settings":"styling",k=l.extend(!0,{},b.get(c)),g={};k||(k={});if(null!==f.activeModel&&b.cid=== f.activeModel.cid){var m=I.Lightbox.$lightbox[0].querySelector("#"+d);if(null!==m){f.hasChanged=!0;ThemifyConstructor.values[d]=a;m.classList.contains("themify-checkbox")?(m=m.getElementsByClassName("tb-checkbox")[0],void 0!==m&&(m.checked=a?!0:!1,p.triggerEvent(m,"change"))):(m.value=a,m=I.Lightbox.$lightbox[0].querySelector("#"+d+"_unit"),null!==m&&(m.value=ThemifyConstructor.values[d+"_unit"]=e));return}}"desktop"!==f.activeBreakPoint?(void 0===k["breakpoint_"+f.activeBreakPoint]&&(k["breakpoint_"+ f.activeBreakPoint]={}),k["breakpoint_"+f.activeBreakPoint][d]=a,e&&(k["breakpoint_"+f.activeBreakPoint][d+"_unit"]=e)):(k[d]=a,e&&(k[d+"_unit"]=e));g[c]=k;b.set(g,{silent:!0})},getSelector:function(b,d,a){return void 0!==this.modules[b]&&void 0!==this.modules[b][d]?this.modules[b][d][a]:void 0},setLivePreview:function(b,d,a,e){if(null!==f.activeModel&&b.cid===f.activeModel.cid)f.liveStylingInstance.setLiveStyle(d,a,e);else{var c=f.activeModel,k=ThemifyConstructor.component;f.activeModel=b;ThemifyConstructor.component= b.get("elType");this.liveinstance=new N;this.liveinstance.init(!0);this.liveinstance.setLiveStyle(d,a,e);f.activeModel=c;ThemifyConstructor.component=k}},onChange:function(){setTimeout(function(){f.Utils._onResize(!0)},1500)},addUndo:function(b,d){var a=!0===f.hasChanged;f.hasChanged=!0;var e=b[0].getAttribute("data-cid"),c=f.Models.Registry.lookup(e),k=l.extend(!0,{},this.liveinstance.undoData),c=l.extend(!0,{},"module"===c.get("elType")?c.get("mod_settings"):c.get("styling")),g=I.clone(u.getElementsByClassName("tb_element_cid_"+ e)[0]);b[0].classList.remove("tb_element_selected");b[0].classList.remove("tb_element_clicked");g[0].classList.remove("tb_element_selected");g[0].classList.remove("tb_element_clicked");f.undoManager.push(e,b,g,"save",{bsettings:d,asettings:c,styles:k,column:!1});this.liveinstance=null;f.hasChanged=a},setModulePosition:function(b){var d=f.ActionBar.prevExpand;if(null!==d){var a=b.getElementsByClassName("tb_dragger_value")[0];d.style.top="";void 0!==a&&null!==a.firstChild&&(a=a.getBoundingClientRect(), d.getBoundingClientRect().bottom>=a.top&&(d.style.top=b.offsetHeight/2+a.height+"px"))}},drag:function(b){if(1===b.which&&null===this.disableDrag&&!b.target.classList.contains("tb_dragger_value")&&(b.target.classList.contains("tb_dragger")||null!==b.target.closest(".tb_dragger"))){var d=b.target.closest(".tb_dragger"),a=l(d).closest("[data-cid]")[0];this.addEdgesOptions(d);if(void 0!==a){var e=f.Models.Registry.lookup(a.getAttribute("data-cid"));if(e){var c=e.get("elType"),k="module"===c?e.get("mod_name"): c;var g=[];var m=null,n=null,q=null,h=b.pageY,p=b.pageX,r=0,t=null,J=null,F=null,C=[],q=null,y=this,D=null,G,H=function(v){if(null===J){b.stopPropagation();J=!0;f.ActionBar.disable=!0;var x=d.getElementsByClassName("tb_dragger_types")[0].getElementsByClassName("current")[0],x=void 0===x?!1:x.classList.contains("tb_apply_all")?"all":"opposite";F=d.classList.contains("tb_dragger_top")||d.classList.contains("tb_dragger_bottom")?"s":"e";q="s"===F?d.classList.contains("tb_dragger_top")?"top":"bottom": d.classList.contains("tb_dragger_left")?"left":"right";n=d.classList.contains("tb_dragger_padding")?"padding":"margin";G=l.extend(!0,{},e.get("module"===c?"mod_settings":"styling"));D=I.clone(a);r=parseFloat(d.dataset.v)||0;t=d.dataset.u;m=y.getSelector(k,n,d.getAttribute("data-id").replace("_"+q,""));void 0!==m&&""!==m&&(a=a.querySelectorAll(m),0===a.length&&(a=null));if(null!==a){u.body.classList.add("tb_drag_start");u.body.classList.add("tb_dragger_drag");u.body.classList.add("tb_dragger_drag_"+ F);w.document.body.classList.add("tb_drag_start");void 0===a[0]&&(a=[a]);for(var z=a.length-1;-1<z;--z)for(var B=a[z].getAttribute("data-cid")?a[z]:a[z].parentNode,B=B.children,A=B.length-1;-1<A;--A)if(B[A].classList.contains("tb_dragger_"+n)){if("opposite"===x){if("s"===F&&(B[A].classList.contains("tb_dragger_left")||B[A].classList.contains("tb_dragger_right"))||"e"===F&&(B[A].classList.contains("tb_dragger_top")||B[A].classList.contains("tb_dragger_bottom")))continue}else if("all"!==x&&!B[A].classList.contains("tb_dragger_"+ q))continue;B[A].classList.add("tb_dragger_dragged");C.push(B[A].getElementsByClassName("tb_dragger_value")[0]);g.push(B[A])}}}if(null!==a)for(z=v.clientX,A=v.clientY,v="px"===t||"%"===t?1:.1,x=d.getBoundingClientRect(),B=0,"left"===q?B=z-x.right:"right"===q?B=x.left-z:"top"===q?B=A-x.bottom:"bottom"===q&&(B=x.top-A),0<B&&(v*=2),"e"===F?z!==p&&(r=z>p?"left"===q?r+v:r-v:"left"===q?r-v:r+v):A!==h&&(r=A>h?r+v:r-v),p=z,h=A,0>r&&"padding"===n?r=0:0!==r%1&&(r=parseFloat(r.toFixed(1))),v=r+t,z=g.length- 1;-1<z;--z){x=g[z].getAttribute("data-prop");for(A=a.length-1;-1<A;--A)a[A].style[x]=v;if("margin"===n){var A=g[z].classList.contains("tb_dragger_top")||g[z].classList.contains("tb_dragger_bottom")?"height":"width",B=r,E=t;"%"===t&&(B=y.getRealPercent(g[z],r),E="px");g[z].style[A]=0>r?-B+E:B+E;g[z].style[x]=-B+E}else g[z].style[x]="%"===t?y.getRealPercent(g[z],r)+"px":v;C[z].textContent=0===r?"":v}},x=function(k){if(!0===J&&null!==a){for(var l=null,h=g.length-1;-1<h;--h){var p=g[h].getAttribute("data-prop"); y.setLivePreview(e,p,r+t,m);for(var v=a.length-1;-1<v;--v)a[v].style[p]="";0===r&&"margin"===n&&(g[h].style.width=g[h].style.height=g[h].style[p]="");g[h].setAttribute("data-v",r);g[h].setAttribute("data-u",t);g[h].classList.remove("tb_dragger_dragged");y.setData(e,g[h].getAttribute("data-id"),r,t);"padding"===n&&"top"===q&&"module"===c&&(l=h)}u.body.classList.remove("tb_dragger_drag_"+F);u.body.classList.remove("tb_drag_start");w.document.body.classList.remove("tb_drag_start");u.body.classList.remove("tb_dragger_drag"); null!==l&&y.setModulePosition(g[l])}u.removeEventListener("mousemove",H,{passive:!0});u.removeEventListener("mouseup",x,{once:!0,passive:!0});w.removeEventListener("mouseup",x,{once:!0,passive:!0});null!==b.target.closest(".tb_dragger_lightbox")&&null!==k.target.closest(".tb_dragger_lightbox")?(b.stopPropagation(),y.optionsClick(b)):!0===J?(y.onChange(),null!==f.activeModel&&f.activeModel.cid===e.cid||y.addUndo(D,G)):k.target===b.target&&k.target.classList.contains("tb_dragger")&&(f.ActionBar.disable= null);d=e=g=G=y=m=C=F=n=p=q=J=a=q=t=r=null;setTimeout(function(){f.ActionBar.disable=null},10)};e&&(u.addEventListener("mousemove",H,{passive:!0}),u.addEventListener("mouseup",x,{once:!0,passive:!0}),w.addEventListener("mouseup",x,{once:!0,passive:!0}))}}}}}})(jQuery,Themify,window,window.top,document,tb_app,ThemifyBuilderCommon);
Back to File Manager