Файловый менеджер - Редактировать - /home/kunzqhe/www/wp-content/themes/themify-ultra/themify/themify-builder/js/editor/frontend/themify-builder-visual.min.js
Ðазад
'use strict';(function(u,n,t,w,r,d,D){function Q(a){function b(b){let c="";for(let a in b)c+=b[a];r.body.insertAdjacentHTML("beforeend",c);a&&a()}if(d.Forms.LayoutPart.init)a&&a();else{var c=function(){if(themifyBuilder.debug)return!1;try{let a=localStorage.getItem("tb_visual_templates"),b=themify_vars.version;if(!a)return!1;a=JSON.parse(a);for(let a in themifyBuilder.modules)b+=a;themifyBuilder.cache_data&&(b+=themifyBuilder.cache_data);return a.h!==n.hash(b)?!1:a.val}catch(e){return!1}}();c?b(c): u.ajax({type:"POST",url:themifyBuilder.ajaxurl,dataType:"json",data:{action:"tb_load_visual_templates",tb_load_nonce:themifyBuilder.tb_load_nonce},success(a){if(a){b(a);try{let b=themify_vars.version;for(let a in themifyBuilder.modules)b+=a;themifyBuilder.cache_data&&(b+=themifyBuilder.cache_data);const c={val:a,h:n.hash(b)};localStorage.setItem("tb_visual_templates",JSON.stringify(c))}catch(g){}}}})}}function K(a,b){for(let c=a.length-1;-1<c;--c)if(b===a[c].selectorText.replace(/\s*>\s*/g,">").replace(/,\s/g, ","))return c;return!1}function E(a){if(void 0===L[a]){const b=a;if(-1!==a.indexOf("-")){const b=a.toLowerCase().split("-");a=b[0]+b[1].charAt(0).toUpperCase()+b[1].slice(1);void 0!==b[2]&&(a+=b[2].charAt(0).toUpperCase()+b[2].slice(1));void 0!==b[3]&&(a+=b[3].charAt(0).toUpperCase()+b[3].slice(1))}return L[b]=a}return L[a]}function R(){const a=w.document.getElementsByClassName("tb_middle_bar"),b=d.Utils.getMouseEvents(),c=function(a){if("touchstart"===a.type||1===a.which){a.stopPropagation();let c= a.clientX,e="tb_right_bar"===this.id?"right":"left",k=tbLocalScript.breakpoints,l=d.toolbar.$el.width(),h=d.iframe.css("transition","none").width(),p=w.document.getElementsByClassName("tb_vertical_change_tooltip")[0],v=w.document.getElementsByClassName("tb_vertical_bars")[0],m=r.createElement("div");m.className="tb_mousemove_cover";p&&p.parentNode.removeChild(p);p=r.createElement("div");p.className="tb_vertical_change_tooltip";this.appendChild(p);v.appendChild(m);v.className+=" tb_resizing_start"; d.iframe[0].classList.add("tb_resizing_start");const N=function(a){a.stopPropagation();a=a.clientX-c;a*=2;"left"===e&&(a=-a);let b=320>h+a?320:h+a;b<=k.mobile?a="mobile":b<=k.tablet[1]?a="tablet":b<=k.tablet_landscape[1]?a="tablet_landscape":(a="desktop",b>l-17&&(b=l));p.textContent=b+"px";d.iframe.css("width",b);d.activeBreakPoint!==a&&ThemifyConstructor.lightboxSwitch(a)};m.addEventListener(b.mouseup,function(a){a.stopPropagation();this.removeEventListener(b.mousemove,N,{passive:!0});this.parentNode.removeChild(this); p.parentNode.removeChild(p);d.iframe.css("transition","");v.classList.remove("tb_resizing_start");d.iframe[0].classList.remove("tb_resizing_start");r.body.classList.remove("tb_start_animate","tb_start_change_mode");d.Utils._onResize(!0);m=v=p=h=k=e=c=l=null},{once:!0,passive:!0});m.addEventListener(b.mousemove,N,{passive:!0});r.body.classList.add("tb_start_animate","tb_start_change_mode")}};for(let e=a.length-1;-1<e;--e)a[e].addEventListener(b.mousedown,c,{passive:!0})}const G=[],H=[],L={},P={};d.mode= "visual";d.iframe="";d.id="";d.is_ajax_call=!1;d.Mixins.Frontend={render_visual(a){const b={},c=n.convert(this.el.querySelectorAll("[data-cid]"));c.unshift(this.el);for(let a=0,g=c.length;a<g;++a){let e=d.Models.Registry.lookup(c[a].getAttribute("data-cid"));e&&(b[e.cid]=e.toJSON())}d.bootstrap(b,a)},change_callback(){const a=this.$el;a[0].insertAdjacentHTML("afterbegin",'<span class="tf_lazy tb_preview_component"></span>');this.render_visual(function(){a.find(".tb_preview_component").remove();d.Utils.setCompactMode(a[0].getElementsByClassName("module_column")); const b="row"===d.eventName?a.data("cid"):d.beforeEvent.data("cid");d.undoManager.push(b,d.beforeEvent,a,d.eventName);d.Mixins.Builder.update(a)})},createEl(a){var b=this.model.get("elType"),c=r.createElement("div");c.innerHTML=a;c=c.getElementsByClassName("module_"+b)[0];var e=c.classList,g=c.attributes;a="subrow"===b?this.el.getElementsByClassName("module_subrow")[0]:this.el;for(var f="subrow"===b?u(a):this.$el,d=e.length-1;-1<d;--d)a.classList.add(e[d]);for(d=g.length-1;-1<d;--d)e=g[d].name,"class"!== e&&(a.setAttribute(e,g[d].value),0===e.indexOf("data-")&&f.data(e.replace("data-",""),g[d].value));f=c.getElementsByClassName("builder_row_cover")[0];e=c.getElementsByClassName("tbp_dc_styles")[0];g=c.getElementsByClassName(b+"-slider")[0];const l=c.getElementsByClassName("tb_row_frame");if(void 0!==l[0]&&l[0].parentNode===c){const b=r.createDocumentFragment(),e=a.getElementsByClassName("tb_row_frame");for(d=e.length-1;-1<d;--d)e[d].parentNode.removeChild(e[d]);for(d=l.length-1;-1<d;--d)l[d].parentNode=== c&&b.appendChild(l[d].cloneNode());a.insertBefore(b,a.firstChild)}void 0!==e&&e.parentNode===c&&(d=a.getElementsByClassName("tbp_dc_styles")[0],void 0!==d?a.replaceChild(e,d):a.appendChild(e));void 0!==f&&f.parentNode===c&&(d=a.getElementsByClassName("builder_row_cover")[0],void 0!==d?a.replaceChild(f,d):a.insertAdjacentElement("afterbegin",f));void 0!==g&&g.parentNode===c&&(b=a.getElementsByClassName(b+"-slider")[0],void 0!==b?a.replaceChild(g,b):a.insertAdjacentElement("afterbegin",g))},restoreHtml(a){var b= r.createElement("div");b.innerHTML=a;a=u(b.firstChild);b=d.liveStylingInstance.$liveStyledElmt;const c=n.convert(a[0].querySelectorAll("[data-cid]"));c.unshift(a[0]);for(let a=c.length-1;-1<a;--a){let b=d.Models.Registry.lookup(c[a].getAttribute("data-cid"));b&&b.trigger("change:view",c[a])}b.replaceWith(a);d.Mixins.Builder.update(a)}};d.previewVisibility=function(){const a=this.$el,b="row"===this.model.get("elType")?this.model.get("styling"):this.model.get("mod_settings");d.isPreview?("hide_all"=== b.visibility_all?a.addClass("hide-all"):("hide"===b.visibility_desktop&&a.addClass("hide-desktop"),"hide"===b.visibility_tablet&&a.addClass("hide-tablet"),"hide"===b.visibility_tablet_landscape&&a.addClass("hide-tablet_landscape"),"hide"===b.visibility_mobile&&a.addClass("hide-mobile")),_.isEmpty(b.custom_parallax_scroll_speed)||(a[0].dataset.parallaxElementSpeed=parseInt(b.custom_parallax_scroll_speed)),_.isEmpty(b.custom_parallax_scroll_reverse)||(a[0].dataset.parallaxElementReverse=!0),_.isEmpty(b.custom_parallax_scroll_fade)|| (a[0].dataset.parallaxFade=!0)):a.removeClass("hide-desktop hide-tablet hide-tablet_landscape hide-mobile hide-all")};Object.assign(d.Views.BaseElement.prototype,d.Mixins.Frontend);d.Views.register_row({initialize(){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);d.vent.on("dom:preview",d.previewVisibility.bind(this))}});d.Views.register_subrow({initialize(){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)}});d.Views.register_column({initialize(){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)}});d.Views.register_module({_jqueryXhr:!1,templateVisual(a){return wp.template("builder-"+this.model.get("mod_name")+ "-content")(a)},initialize(){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);d.vent.on("dom:preview",d.previewVisibility.bind(this))},createEl(a){var b=r.createElement("div");const c=r.createDocumentFragment(),e=r.createElement("div"), g=r.createElement("div"),f=r.createElement("div"),k=r.createElement("div"),l=this.model.get("mod_name");b.innerHTML=a;a=b.getElementsByClassName("module")[0];b=b.querySelector("#tb_module_styles");if(void 0===a)return d.is_ajax_call||(d.Models.Registry.remove(this.model.cid),this.model.destroy()),!1;if(null!==b){b=JSON.parse(b.innerText);for(let a in b)!n.cssLazy[a]&&b[a].s&&(n.cssLazy[a]=!0,n.LoadCss(b[a].s,b[a].v))}for(;null!==this.el.firstChild;)this.el.firstChild.remove();k.className="tb_visibility_hint"; k.appendChild(d.Utils.getIcon("ti-eye"));e.className="tb_data_mod_name";e.innerHTML=themifyBuilder.modules[l].name;g.className="tf_plus_icon tb_column_btn_plus tb_module_btn_plus tb_disable_sorting";f.className="tb_action_wrap tb_module_action";a.classList.add("module-"+l,"tb_"+this.model.get("element_id"));a.appendChild(e);c.appendChild(f);c.appendChild(a);c.appendChild(k);c.appendChild(g);this.el.appendChild(c);d.Utils.visibilityLabel(this.el);if("image"===l&&!0===n.is_builder_loaded&&!1===d.id){let a= this.el;setTimeout(function(){d.Utils.checkImageSize(a);d.Utils.calculateHeight();a=null},500)}},shortcodeToHTML(a){const b=[],c=themifyBuilder.available_shortcodes;let e=!1;for(let g=0,d=c.length;g<d;++g)a=wp.shortcode.replace(c[g],a,function(a){a=wp.shortcode.string(a);let c=n.hash(a);void 0===G[c]?(b.push(a),a='<span class="tmp'+c+'">[loading shortcode...]</span>'):a=G[c];e=!0;return a});if(e&&0<b.length){const a=this;void 0!==a._shortcodeXhr&&4!==a._shortcodeXhr&&a._shortcodeXhr.abort();a._shortcodeXhr= u.ajax({type:"POST",url:themifyBuilder.ajaxurl,dataType:"json",data:{action:"tb_render_element_shortcode",shortcode_data:JSON.stringify(b),tb_load_nonce:themifyBuilder.tb_load_nonce},success(b){if(b.success){const c=b.data.shortcodes;if(b=b.data.styles)for(let a=0,c=b.length;a<c;++a)n.LoadCss(b[a].s,b[a].v,null,b[a].m);for(let e=0,g=c.length;e<g;++e)b=n.hash(c[e].key),a.$el.find(".tmp"+b).replaceWith(c[e].html),G[b]=c[e].html,n.is_builder_loaded&&d.Utils.loadContentJs(a.$el,"module")}}})}return{content:a, found:e}},previewLive(a,b,c,e,g){d.is_ajax_call=!1;this._jqueryXhr&&4!==this._jqueryXhr&&this._jqueryXhr.abort();let f=null!==d.activeModel&&e,k,l=300;a.cid=c?c:d.activeModel.cid;if(!f||!0===b){k=this.templateVisual(a);if(d.is_ajax_call)return;!0===b&&(a=this.shortcodeToHTML(k),a.found&&(l=1E3,k=a.content,f=null))}if(f){c=e.length;if(void 0===c)e.innerHTML=g;else for(--c;-1<c;--c)e[c].innerHTML=g;d.Utils.calculateHeight()}else if(this.createEl(k),c)d.Utils.calculateHeight();else{d.liveStylingInstance.$liveStyledElmt= this.$el;const a=this;this.timeout&&clearTimeout(this.timeout);this.timeout=setTimeout(function(){d.Utils.loadContentJs(a.$el,"module");d.Utils.calculateHeight()},l)}},previewReload(a,b,c){function e(a){g.createEl(a);d.liveStylingInstance.$liveStyledElmt=g.$el;d.Utils.loadContentJs(g.$el,"module");g.$el.find(".tb_preview_component").remove();d.Utils.calculateHeight()}if(b&&d.activeModel.cid&&c){const e=b.length;if(void 0===e)b.innerHTML=c;else for(a=0;a<e;++a)b[a].innerHTML=c;d.Utils.calculateHeight()}else{var g= this;this._jqueryXhr&&4!==this._jqueryXhr&&this._jqueryXhr.abort();d.is_ajax_call=!0;b=this.model.get("mod_name");c=a.unsetKey;g.el.insertAdjacentHTML("afterbegin",'<span class="tb_preview_component tf_lazy"></span>');delete a.cid;delete a.unsetKey;delete a.element_id;a=d.Utils.clear(a);a["module_"+b+"_slug"]=1;a=JSON.stringify(a);var f=n.hash(a);if(void 0===H[f]||c)return this._jqueryXhr=u.ajax({type:"POST",url:themifyBuilder.ajaxurl,data:{action:"tb_load_module_partial",tb_post_id:themifyBuilder.post_ID, tb_cid:this.model.cid,element_id:this.model.get("element_id"),tb_module_slug:b,tb_module_data:a,tb_load_nonce:themifyBuilder.tb_load_nonce},success(a){H[f]=a;e(a);d.is_ajax_call=g._jqueryXhr=!1},error(){g.$el.removeClass("tb_preview_loading")}}),this;e(H[f])}}});d.bootstrap=function(a,b,c){const e=[];let g=!0;a||(g=!1,a=d.Models.Registry.items);for(let b in a){a=d.Models.Registry.items[b];let c=a.toJSON(),f=c.elType,h=c["module"===f?"mod_settings":"styling"];if(h&&0<Object.keys(h).length)!0===g&& d.liveStylingInstance.setCss([c],"module"===f?c.mod_name:f);else if("module"!==f)continue;if("module"===f&&"tile"!==c.mod_name&&void 0===c.mod_settings.__dc__&&"ajax"!==themifyBuilder.modules[c.mod_name].type)a.trigger("custom:preview:live",c.mod_settings,"accordion"===c.mod_name||"box"===c.mod_name||"feature"===c.mod_name||"tab"===c.mod_name||"text"===c.mod_name||"plain-text"===c.mod_name||"pointers"===c.mod_name||"pro-image"===c.mod_name||"countdown"===c.mod_name||"button"===c.mod_name||"pro-slider"=== c.mod_name||"timeline"===c.mod_name,b);else{if("column"===f)delete c.modules;else if("row"===f||"module"===f||"subrow"===f){if("row"===f&&"tb-page-break"===h.custom_css_row)continue;delete c.cols}e.push({jobID:b,data:c})}}this.batch_rendering(e,0,360,b,c)};d.batch_rendering=function(a,b,c,e,g){if(b>=a.length)"function"===typeof e&&e.call(this),d.toolbar.pageBreakModule.countModules(),n.trigger("tb_css_visual_modules_load");else{const f=a.slice(b,b+c);this.render_element(f,g).done(function(){d.batch_rendering(a, b+=c,c,e)})}};d.render_element=function(a,b){a={action:"tb_render_element",tmpGS:b?JSON.stringify(b):"",batch:JSON.stringify(a),tb_load_nonce:themifyBuilder.tb_load_nonce,tb_post_id:themifyBuilder.post_ID};return u.ajax({type:"POST",url:themifyBuilder.ajaxurl,dataType:"json",data:a,success(a){for(let b in a)"tb_module_styles"!==b&&"gs"!==b&&d.Models.Registry.lookup(b).trigger("create:element",a[b]);if(a.tb_module_styles){a=a.tb_module_styles;for(let b in a){let c=a[b].s;!n.cssLazy[b]&&c&&(n.cssLazy[b]= !0,P[c]=!0,n.LoadCss(c,a[b].v,null,null,function(){delete P[c];0===Object.keys(P).length&&n.trigger("tb_css_visual_modules_load")}))}}else n.trigger("tb_css_visual_modules_load")}})};d.render=function(){Q(function(){var a=r.getElementsByClassName("themify_builder_content");const b=themifyBuilder.post_ID;let c=null;for(let e=a.length-1;-1<e;--e)a[e].getAttribute("data-postid")!=b?a[e].classList.add("not_editable_builder"):null===c&&(c=a[e],c.setAttribute("id","themify_builder_content-"+b),c.setAttribute("data-postid", b),c.classList.remove("not_editable_builder"),c.classList.add("tb_active_builder"));a=t["builderdata_"+b]?t["builderdata_"+b].data:[];a=Array.isArray(a)&&0!==a.length?a.filter(function(a){return a&&0<Object.keys(a).length}):{};t["builderdata_"+b]=null;d.id=b;d.Instances.Builder[d.builderIndex]=new d.Views.Builder({el:c,collection:new d.Collections.Rows(a),type:d.mode});d.Instances.Builder[d.builderIndex].render();a=null;d.bootstrap(null,function(){ThemifyStyles.init(ThemifyConstructor.data,ThemifyConstructor.breakpointsReverse, b);d.liveStylingInstance=new q;d.liveStylingInstance.setCss(d.Mixins.Builder.toJSON(d.Instances.Builder[0].el));setTimeout(R,2E3);n.on("tb_css_visual_modules_load",function(){const a=w.document.getElementById("tf_svg"),b=r.getElementById("tf_svg");a.parentNode.replaceChild(b,a);d.toolbar.el.style.display="block";w.jQuery("body").trigger("themify_builder_ready");d.Utils.loadContentJs();n.is_builder_loaded=!0;d.Instances.Builder[d.builderIndex].$el.triggerHandler("tb_init");d.id=!1;setTimeout(function(){d.Utils.checkAllimageSize(); d.EdgeDrag.init()},500)},!0)})})};n.body.one("builderiframeloaded.themify",function(a,b){d.iframe=u(b);setTimeout(function(){n.loadAnimateCss()},1);D.setToolbar();d.toolbar=new d.Views.Toolbar({el:"#tb_toolbar"});d.toolbar.render();d.GS.init();n.LoadAsync(tbLocalScript.builder_url+"/js/editor/themify-constructor.js",function(){t.wp.media=t.top.wp.media;t.MediaElementPlayer=t.top.MediaElementPlayer;jQuery.fn.mediaelementplayer=t.top.jQuery(t.top.document).mediaelementplayer;t.wp.mediaelement=t.top.wp.mediaelement; t.tinyMCE=t.top.tinyMCE;t.tinyMCEPreInit=t.top.tinyMCEPreInit;t.tinymce=t.top.tinymce;t.switchEditors=t.top.switchEditors;t.wpApiSettings=t.top.wpApiSettings;ThemifyConstructor.getForms(d.render)},null,null,function(){return"undefined"!==typeof ThemifyConstructor});r.addEventListener("submit",function(a){a.preventDefault()});r.addEventListener("click",function(a){var b=a.target;b="A"===b.tagName?b:b.closest("a");!b||"_blank"===b.target||"#"!==b.href&&b.href&&b.href.replace((new URL(b.href)).hash, "")===t.top.location.href.replace(location.hash,"")||a.preventDefault()})});const q=function(){this.$context=u("#tb_lightbox_parent",w.document);this.$liveStyledElmt=null;this.module_rules={};this.rulesCache={};this.currentStyleObj={}};q.prototype.init=function(a,b){let c;var e=d.activeModel.get("element_id");this.type=d.activeModel.get("elType");this.group="module"===this.type?d.activeModel.get("mod_name"):this.type;!0===b&&null!==d.GS.previousModel?(e=d.Models.Registry.lookup(d.GS.previousModel), c=e.get("elType"),"module"===c&&(c=e.get("mod_name")),e=e.get("element_id")):c=this.group;this.prefix=ThemifyStyles.getBaseSelector(c,e);this.$liveStyledElmt=b?u(r.querySelector(this.prefix)):d.Instances.Builder[d.builderIndex].$el.find(".tb_element_cid_"+d.activeModel.cid).first();this.currentStyleObj={};this.tempData={};this.undoData={};this.undoData[d.activeBreakPoint]={};this.tempData[d.activeBreakPoint]={};void 0===this.rulesCache[d.activeBreakPoint]&&(this.rulesCache[d.activeBreakPoint]={}); this.currentSheet=this.getSheet(d.activeBreakPoint,b);!0!==a&&("column"!==this.type&&"subrow"!==this.type&&this.bindAnimation(),this.bindTabsSwitch(),this.initModChange())};q.prototype.setCss=function(a,b,c){a=d.GS.createCss(a,b,void 0);b=[];for(let d in a)if("fonts"===d||"cf_fonts"===d)for(let c in a[d]){var e=c;0<a[d][c].length&&(e+=":"+a[d][c].join(","));b.push(e)}else if("gs"===d){e=a[d];for(let a in e){var g=this.getSheet(a,!0);let b=g.cssRules?g.cssRules:g.rules;for(let c in e[a])!1===K(b,c)&& g.insertRule(c+"{"+e[a][c].join("")+";}",b.length)}}else if("bg"!==d){e=this.getSheet(d,c);g=e.cssRules?e.cssRules:e.rules;for(let b in a[d])!1===K(g,b)&&e.insertRule(b+"{"+a[d][b].join("")+";}",g.length)}ThemifyConstructor.font_select.loadGoogleFonts(b.join("|"));return a};q.prototype.setLiveStyle=function(a,b,c){c?"string"===typeof c&&(c=[c]):c=[""];c=ThemifyStyles.getNestedSelector(c);let e="";const g=this.currentSheet.cssRules?this.currentSheet.cssRules:this.currentSheet.rules;for(let a=0,b=c.length;a< b;++a){var f="h"===this.styleTabId?c[a].endsWith(":after")||c[a].endsWith(":before"):!0;!1===f&&-1===c[a].indexOf(":hover")&&(c[a]+=":hover");e+=this.prefix+c[a];!1===f&&(e+=","+this.prefix+c[a].replace(":hover",".tb_visual_hover"));a!==b-1&&(e+=",")}if(!0===this.isChanged)if("h"===this.styleTabId){f=e.split(",");for(var k=f.length-1;-1<k;--k)if(-1===f[k].indexOf("tb_visual_hover")){c=r.querySelectorAll(f[k].split(":hover")[0]);for(var l=c.length-1;-1<l;--l)c[l].classList.add("tb_visual_hover")}}else for(this.$liveStyledElmt[0].classList.remove("tb_visual_hover"), c=this.$liveStyledElmt[0].getElementsByClassName("tb_visual_hover"),f=c.length-1;-1<f;--f)c[f].classList.remove("tb_visual_hover");e=e.replace(/\s{2,}/g," ").replace(/\s*>\s*/g,">").replace(/,\s/g,",");c=n.hash(e);f=b;k=a;l=void 0!==this.rulesCache[d.activeBreakPoint][c]?this.rulesCache[d.activeBreakPoint][c]:K(g,e);!1===b&&(b="");a=E(a);!1!==l&&g[l]?(void 0===this.tempData[d.activeBreakPoint][l]&&(this.tempData[d.activeBreakPoint][l]={}),void 0===this.tempData[d.activeBreakPoint][l][a]&&(this.tempData[d.activeBreakPoint][l][a]= g[l].style[a]),g[l].style[a]=b):(l=g.length,this.currentSheet.insertRule(e+"{"+k+":"+b+";}",l),void 0===this.tempData[d.activeBreakPoint][l]&&(this.tempData[d.activeBreakPoint][l]={}),this.tempData[d.activeBreakPoint][l][a]="");this.rulesCache[d.activeBreakPoint][c]=l;void 0===this.undoData[d.activeBreakPoint][l]&&(this.undoData[d.activeBreakPoint][l]={});this.undoData[d.activeBreakPoint][l][a]={a:b,b:this.tempData[d.activeBreakPoint][l][a]};n.body.triggerHandler("tb_"+this.type+"_styling",[this.group, a,b,f,this.$liveStyledElmt]);"desktop"===d.activeBreakPoint||0!==a.indexOf("padding")&&0!==a.indexOf("margin")&&"height"!==a&&"width"!==a||d.Utils.calculateHeight()};q.prototype.initModChange=function(a){if(!0===a)n.body.off("themify_builder_change_mode.tb_visual_mode");else{var b=this;n.body.on("themify_builder_change_mode.tb_visual_mode",function(a,e,g){b.setMode(g,null!==d.GS.activeGS)})}};q.prototype.setMode=function(a,b){void 0===this.tempData[a]&&(this.tempData[a]={});void 0===this.rulesCache[a]&& (this.rulesCache[a]={});void 0===this.undoData[a]&&(this.undoData[a]={});this.currentSheet=this.getSheet(a,b)};q.prototype.revertRules=function(a){for(let c in this.tempData){var b=this.getSheet(c,a);b=b.cssRules?b.cssRules:b.rules;for(let a in this.tempData[c])if(b[a])for(let e in this.tempData[c][a])b[a].style[e]=this.tempData[c][a][e]}this.undoData={};this.tempData={}};q.prototype.getSheet=function(a,b){return ThemifyStyles.getSheet(a,b)};q.prototype.reset=function(){this.rulesCache={};this.tempData= {};this.undoData={};const a=ThemifyConstructor.breakpointsReverse;for(let c=a.length-1;-1<c;--c){let e=this.getSheet(a[c]);var b=e.cssRules;for(b=b.length-1;-1<b;--b)e.deleteRule(b);e=this.getSheet(a[c],!0);b=e.cssRules;for(b=b.length-1;-1<b;--b)e.deleteRule(b)}};q.prototype.clear=function(){var a=this.$liveStyledElmt[0];void 0!==a&&a.classList.remove("animated","hover-wow","tb_visual_hover");this.module_rules={};this.styleTab=this.styleTabId=this.currentField=this.isChanged=null;if(!d.saving&&d.hasChanged)this.revertRules(null!== d.GS.activeGS),this.type&&"module"!==this.type&&null===d.GS.activeGS&&(a=d.activeModel.get("styling"))&&"slider"===a.background_type&&a.background_slider&&this.bindBackgroundSlider();else{a=a.getElementsByClassName("tb_visual_hover");for(let 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};q.prototype.addOrRemoveFrame= function(a,b){if("module"!==this.type){var c=this,e=this.$liveStyledElmt,g="string"===typeof a;a=g?a:a.closest(".tb_tab").id.split("_").pop();var f=e.children(".tb_row_frame_"+a);if(void 0===b){b={};var k=this.getValue(a+"-frame_type").selector,l="custom location width height width_unit height_unit repeat type layout color".split(" ");for(let c=0,e=l.length;c<e;++c){var h=w.document.getElementById(a+"-frame_"+l[c]);if("type"===l[c])h=h.querySelector("input:checked").value;else if("layout"===l[c])h= h.getElementsByClassName("selected")[0].id;else if("color"===l[c]){if(h=d.Utils.getColor(h),""===h)continue}else h=h.value;b[l[c]]=h}}if(b.type===a+"-presets"||b.type===a+"-custom"){if(b.type===a+"-presets"&&(!b.layout||"none"===b.layout)||b.type===a+"-custom"&&!b.custom){"desktop"===d.activeBreakPoint?g||this.setLiveStyle("background-image","",k):"none"===b.layout&&this.setLiveStyle("background-image","none",k);return}0===f.length?(f=r.createElement("div"),f.className="tf_abs tb_row_frame tb_row_frame_"+ a,void 0!==b.location&&(f.className+=" "+b.location),e.children(".tb_action_wrap").after(f)):(f.removeClass("behind_content in_front"),void 0!==b.location&&f.addClass(b.location))}if(!g){if(b.type===a+"-presets"){e="left"===a||"right"===a?b.layout+"-l":b.layout;const d=n.hash(e),f=function(a){b.color&&(a=a.replace(/#D3D3D3/ig,b.color));c.setLiveStyle("background-image",'url("data:image/svg+xml;utf8,'+encodeURIComponent(a)+'")',k)};void 0!==ThemifyStyles.fields.frameCache[d]?f(ThemifyStyles.fields.frameCache[d]): (g=r.getElementById("tmpl-frame_"+e),null!==g?(ThemifyStyles.fields.frameCache[d]=g.textContent.trim(),f(ThemifyStyles.fields.frameCache[d])):u.ajax({dataType:"text",url:tbLocalScript.builder_url+"/img/row-frame/"+e+".svg",success(a){ThemifyStyles.fields.frameCache[d]=a;f(a)}}))}else c.setLiveStyle("background-image",'url("'+b.custom+'")',k);c.setLiveStyle("width",b.width?b.width+b.width_unit:"",k);c.setLiveStyle("height",b.height?b.height+b.height_unit:"",k);b.repeat?"left"===a||"right"===a?c.setLiveStyle("background-size", "100% "+100/b.repeat+"%",k):c.setLiveStyle("background-size",100/b.repeat+"% 100%",k):c.setLiveStyle("background-size","",k)}}};q.prototype.overlayType=function(a){if("module"!==this.type){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=d.Utils.getColor(a)),n.triggerEvent(a,"themify_builder_color_picker_change",{val:b})):n.triggerEvent(a,"change")}}; q.prototype.addOrRemoveComponentOverlay=function(a,b,c){if("module"!==this.type){var e=this.getComponentBgOverlay(),d=this.getValue(b),f=d.selector;e=0!==e.length;"h"===this.styleTabId?this.$liveStyledElmt[0].classList.add("tb_visual_hover"):this.$liveStyledElmt[0].classList.remove("tb_visual_hover");""===c&&b?(this.setLiveStyle("backgroundImage","",f),this.setLiveStyle("backgroundColor","",f)):(e||(e=r.createElement("div"),e.className="tf_abs builder_row_cover",this.$liveStyledElmt.children(".tb_action_wrap").before(e)), d&&("color"===a?this.setLiveStyle("backgroundImage","none",f):this.setLiveStyle("backgroundColor",!1,f),this.setLiveStyle(d.prop,c,f)))}};q.prototype.bindMultiFields=function(a,b){function c(a,b){if(!1===l&&!1===k){if("row"===e.type&&void 0===tbLocalScript.fullwidth_support&&(h&&("padding"===b||"margin"===b)||"padding-left"===b||"padding-right"===b||"margin-left"===b||"margin-right"===b)){const c=b.split("-"),g=d.activeBreakPoint+"-"+c[0];if(h)a=a+","+a;else{let b=e.$liveStyledElmt.data(g);b=b?b.split(","): [];"left"===c[1]?b[0]=a:b[1]=a;a=b.join(",")}e.$liveStyledElmt.attr("data-"+g,a).data(g,a);ThemifyBuilderModuleJs.setupFullwidthRows(e.$liveStyledElmt)}(h&&"padding"===b||0===b.indexOf("padding"))&&setTimeout(function(){n.trigger("tfsmartresize")},600)}}const e=this;if(b=e.getValue(a.id)){var g=a.closest(".tb_seperate_items"),f=b.prop.split("-"),k=void 0!==f[3],l=!1===k&&"border"===f[0],h=g.hasAttribute("data-checked");g=g.getElementsByClassName("tb_multi_field");var p=function(a){let b="";if(!0=== l){var c=a.closest("li");a=parseFloat(c.getElementsByClassName("border_width")[0].value.trim());const e=c.getElementsByClassName("border_style")[0].value;c=d.Utils.getColor(c.getElementsByClassName("minicolors-input")[0]);"none"===e?b=e:isNaN(a)||""===a||""===c||(b=a+"px "+e+" "+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};a=!0===h?p(a):null;f=f[0];for(let d=g.length-1;-1<d;--d)!1===h&&(a=p(g[d])),f=e.getValue(g[d].id).prop, e.setLiveStyle(f,a,b.selector),c(a,f);!1===l&&(d.ActionBar.hoverCid=null);g=null}};q.prototype.bindRowWidthHeight=function(a,b,c){c||(c=this.$liveStyledElmt);"row_height"===a?"fullheight"===b?c[0].classList.add(b):c[0].classList.remove("fullheight"):"fullwidth"===b?(c.removeClass("fullwidth").addClass("fullwidth_row_container"),ThemifyBuilderModuleJs.setupFullwidthRows(c)):"fullwidth-content"===b?(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:""});n.trigger("tfsmartresize")};q.prototype.bindAnimation=function(a){const b=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"; const d=a?this.value:b.$context.find("#animation_effect").val();var f=void 0!==b.currentStyleObj[e]?b.currentStyleObj[e]:ThemifyConstructor.values[e];const k=b.$liveStyledElmt;f&&k.removeClass(f+" wow").css({"animation-name":"","animation-delay":"","animation-iteration-count":""});k.removeClass("animated tb_hover_animate");if(b.currentStyleObj[e]=d)e=a?"":parseFloat(b.$context.find("#animation_effect_delay").val()),a=a?"":parseInt(b.$context.find("#animation_effect_repeat").val()),f=tbLocalScript.is_animation, k.css({"animation-delay":0<e&&!isNaN(e)?e+"s":"","animation-iteration-count":0<a&&!isNaN(a)?a:""}).addClass("wow").attr("data-tf-animation",d),tbLocalScript.is_animation=!0,ThemifyBuilderModuleJs.wowInit(k,null,!1),tbLocalScript.is_animation=f})};q.prototype.getRowAnchorClass=function(a){return 0<a.length?"tb_has_section tb_section-"+a:""};q.prototype.getStylingVal=function(a){return void 0!==this.currentStyleObj[a]?this.currentStyleObj[a]:""};q.prototype.setStylingVal=function(a,b){this.currentStyleObj[a]= b};q.prototype.bindBackgroundMode=function(a,b){const 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%"},e=this.$liveStyledElmt[0];if(void 0!==c[a]){let d={};b=this.getValue(b);let f=w.document.getElementById(b.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%"));e.classList.remove("builder-parallax-scrolling","builder-zooming","builder-zoom-scrolling");e.style.backgroundSize=e.style.backgroundPosition=""; if("module"!==this.type||"builder-parallax-scrolling"!==a&&"builder-zooming"!==a&&"builder-zoom-scrolling"!==a&&"best-fit-image"!==a){"builder-parallax-scrolling"===a?e.classList.add("builder-parallax-scrolling"):"builder-zooming"===a?e.classList.add("builder-zooming"):"builder-zoom-scrolling"===a&&e.classList.add("builder-zoom-scrolling");for(let a in d)this.setLiveStyle(a,d[a],b.selector);"builder-zoom-scrolling"===a?ThemifyBuilderModuleJs.backgroundZoom(this.$liveStyledElmt):"builder-zooming"=== a?ThemifyBuilderModuleJs.backgroundZooming(this.$liveStyledElmt):"builder-parallax-scrolling"===a&&ThemifyBuilderModuleJs.backgroundScrolling(this.$liveStyledElmt)}}};q.prototype.position=function(a,b){a&&0<a.length&&(b=this.getValue(b))&&(a=a.split(","),this.setLiveStyle(b.prop,a[0]+"% "+a[1]+"%",b.selector))};q.prototype.bindBackgroundSlider=function(a){if("module"!==this.type){var b=this;a=b.$context.find("#"+a.id).val().trim();b.removeBgSlider();if(a){void 0===this.cahce&&(this.cahce={});a={shortcode:encodeURIComponent(a), mode:b.$context.find("#background_slider_mode").val(),speed:b.$context.find("#background_slider_speed").val(),size:b.$context.find("#background_slider_size").val()};const c=function(a){a=u(a);const c=b.getComponentBgOverlay();0<c.length?c.after(a):b.$liveStyledElmt.prepend(a);ThemifyBuilderModuleJs.backgroundSlider(a[0].parentNode)};let e="";for(let b in a)e+=n.hash(b+a[b]);void 0!==this.cahce[e]?c(this.cahce[e]):(a.type=b.type,u.post(themifyBuilder.ajaxurl,{nonce:themifyBuilder.tb_load_nonce,action:"tb_slider_live_styling", tb_background_slider_data:a},function(a){10>a.length||(b.cahce[e]=a,c(a))}))}}};q.prototype.videoOptions=function(a,b){if("module"!==this.type){var c=this.$liveStyledElmt.find(".big-video-wrap").first();a=!0===a.checked;var 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?a?("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&&(a?("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"))))}};q.prototype.bindBackgroundTypeRadio= function(a){let 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";const c=this.styleTab.getElementsByClassName("tb_group_element_"+a)[0];n.triggerEvent(c.getElementsByClassName(b)[0],"change");"image"===a&&"module"===this.type&&(b=c.getElementsByClassName("minicolors-input")[0])&&n.triggerEvent(b, "themify_builder_color_picker_change",{val:b.value})};q.prototype.bindFontColorType=function(a,b,c){if("radio"===c)if(b=-1!==a.indexOf("_solid"),a=!0===b?a.replace(/_solid$/ig,""):a.replace(/_gradient$/ig,"-gradient-type"),a=w.document.getElementById(a),!0===b){b=d.Utils.getColor(a);if(void 0===b||""===b)b="";n.triggerEvent(a,"themify_builder_color_picker_change",{val:b})}else n.triggerEvent(a,"change");else b=this.getValue(b).selector,"color"===c?void 0===a||""===a?(a="",this.setLiveStyle("WebkitBackgroundClip", "",b),this.setLiveStyle("backgroundClip","",b),this.setLiveStyle("backgroundImage","",b)):(this.setLiveStyle("WebkitBackgroundClip","border-box",b),this.setLiveStyle("backgroundClip","border-box",b),this.setLiveStyle("backgroundImage","none",b)):""!==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)};q.prototype.shadow=function(a,b,c){if(b= this.getValue(b)){a=a.closest(".tb_seperate_items").getElementsByClassName("tb_shadow_field");c="";let e=!0,g="";for(let b=0,k=a.length;b<k;++b)if(a[b].classList.contains("tb-checkbox"))c=a[b].checked?"inset ":"";else{let c=a[b].value.trim();"color"===ThemifyConstructor.styles[a[b].id].type?c=d.Utils.getColor(a[b]):""===c?c=0:(e=!1,c+=a[b].closest(".tb_input").querySelector("#"+a[b].id+"_unit").value);g+=c+" "}g=!0===e?"":c+g;this.setLiveStyle(b.prop,g,b.selector)}};q.prototype.filters=function(a, b){a=a.closest(".tb_filters_fields").getElementsByClassName("tb_filters_field");let c="",e;for(let b=0,d=a.length;b<d;++b){let d=a[b].value.trim();""!==d&&(e=this.getValue(a[b].id),d+=a[b].closest(".tb_seperate_items").querySelector("#"+a[b].id+"_unit").textContent,d="hue"===e.prop?"hue-rotate("+d+")":e.prop+"("+d+")",c+=d+" ")}e=this.getValue(b);this.setLiveStyle("filter",c,e.selector)};q.prototype.transform=function(a,b){let c="";a=a.closest(".tb_transform_fields");const d=this.getValue(b),g=["scale", "translate","rotate","skew"];b=b.split("_")[0];for(let d=0,e=g.length;d<e;++d)switch(g[d]){case "scale":case "translate":case "skew":var f=a.querySelector("#"+b+"_"+g[d]+"_top").value.trim();const e=a.querySelector("#"+b+"_"+g[d]+"_bottom").value.trim();var k="translate"===g[d]?{x:a.querySelector("#"+b+"_"+g[d]+"_top_unit").value,y:a.querySelector("#"+b+"_"+g[d]+"_bottom_unit").value}:"skew"===g[d]?"deg":"";if(""!==f||""!==e)c=""!==f&&a.querySelector("#"+b+"_"+g[d]+"_opp_bottom .style_apply_oppositive").checked? c+(g[d]+"("+f+("translate"===g[d]?k.x:k)+") "):""!==f&&""!==e?c+(g[d]+"("+f+("translate"===g[d]?k.x:k)+","+e+("translate"===g[d]?k.y:k)+") "):c+(""!==f?g[d]+"X("+f+("translate"===g[d]?k.x:k)+") ":g[d]+"Y("+e+("translate"===g[d]?k.y:k)+") ");break;case "rotate":k=["x","y","z"];for(let e in k)k.hasOwnProperty(e)&&(f=a.querySelector("#"+b+"_"+g[d]+"_"+k[e]).value.trim(),""!==f&&(c+=g[d]+k[e].toUpperCase()+"("+f+"deg) "))}this.setLiveStyle("transform",c.trim(),d.selector)};q.prototype.position=function(a, b){a&&0<a.length&&(b=this.getValue(b))&&(a=a.split(","),this.setLiveStyle(b.prop,a[0]+"% "+a[1]+"%",b.selector))};q.prototype.setData=function(a,b,c){if(a=this.getValue(a))""===b&&(b=a.prop),this.setLiveStyle(b,c,a.selector)};q.prototype.bindEvents=function(a,b){if(!a.classList.contains("style_apply_all")){var c=this;(function(){var e=b.type,g=b.prop,f=b.id;var k="color"===e?"themify_builder_color_picker_change":"gradient"===e?"themify_builder_gradient_change":"text"===e||"range"===e?"keyup":"change"; a.addEventListener(k,function(a){var h=this.classList,p="SELECT"===this.tagName,l=!p&&"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 m=this.closest(".tb_tab");null===m?(m=this.closest(".tb_expanded_opttions"),null===m&&(m=w.document.getElementById("tb_options_styling"))):c.styleTabId=m.id.split("_").pop();c.styleTab=m}else c.isChanged=!1;d.hasChanged=!0;a=a.detail&&a.detail.val? a.detail.val:"frame"===e?this.id:this.value;a=void 0!==a&&"undefined"!==a?a.trim():"";if(h.contains("tb_transform_field"))c.transform(this,f);else if("color"===e&&h.contains("border_color")||!0===p&&h.contains("border_style")||"keyup"===k&&(h.contains("border_width")||h.contains("tb_multi_field")))c.bindMultiFields(this);else if("frame-custom"===g||"frame"===e||h.contains("tb_frame"))"module"!==c.type&&c.addOrRemoveFrame(this);else if(h.contains("tb_shadow_field"))c.shadow(this,f);else if(h.contains("tb_filters_field"))c.filters(this, f);else if("keyup"===k)""!==a&&("column-rule-width"===g?(a+="px",h=f.replace("_width","_style"),p=w.document.getElementById(h),null!==p&&c.setData(h,"",p.value)):"column-gap"===g?a+="px":(h=w.document.getElementById(f+"_unit"),null!==h&&(a+=h.value?h.value:"px"))),c.setData(f,"",a);else if(!0===b.isFontColor)c.bindFontColorType(a,f,e);else{if(!0===p)if("font-weight"===g)h=this.getAttribute("data-selected"),p=c.styleTab.getElementsByClassName("tb_multi_fonts")[0],null!==h&&""!==h&&"default"!==h&&void 0=== ThemifyConstructor.font_select.safe[h]&&ThemifyConstructor.font_select.loadGoogleFonts(h+":"+a),-1!==a.indexOf("italic")?(a=parseInt(a.replace("italic","")),h=p.querySelector('[value="italic"]')):h=p.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],p=a,void 0!==h?p+=":"+h.value:c.setLiveStyle("font-weight", "",b.selector),ThemifyConstructor.font_select.loadGoogleFonts(p)):"default"===a&&(a=""),""!==a&&(a=ThemifyStyles.parseFontName(a));else{if(h.contains("tb_unit")){n.triggerEvent(c.$context.find("#"+f.replace("_unit",""))[0],"keyup");return}if("background-mode"===g){c.bindBackgroundMode(a,f);return}if("column-count"===g&&0==a)a="";else if(h.contains("tb_position_field"))for(h=["top","right","bottom","left"],p=this.closest(".tb_input"),l=h.length-1;-1<l;--l){m="";if("absolute"===a||"fixed"===a){let a= "#"+b.id+"_"+h[l];m="auto";p.querySelector(a+"_auto input").checked||(m=p.querySelector(a).value.trim()+p.querySelector(a+"_unit").value.trim())}c.setLiveStyle(h[l],m,b.selector)}else if("display"===g){if("none"===a)return!1;"inline-block"===a?c.setLiveStyle("width","auto",b.selector):c.setLiveStyle("width","100%",b.selector)}else"vertical-align"===g&&""!==a&&c.setLiveStyle("align-self","top"===a?"flex-start":"middle"===a?"center":"flex-end",b.selector)}else{if("gallery"===e&&"module"!==c.type){c.bindBackgroundSlider(b); return}if(!0===l){f=this.closest(".tb_lb_option").id;!1===this.checked&&(a="");if("imageGradient"===e||!0===b.is_background){c.bindBackgroundTypeRadio(a);return}if(!0===b.is_overlay){"module"!==c.type&&c.overlayType(a);return}}else if("color"===e||"gradient"===e){"gradient"===e&&(f=this.dataset.id);if(!0===b.is_overlay){"module"!==c.type&&c.addOrRemoveComponentOverlay(e,f,a);return}"color"===e&&(h=null,"module"===c.type&&void 0!==b.colorId&&void 0!==b.origId?(h=w.document.getElementById(b.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":"",b.selector))}else if("image"===e||"video"===e){if("video"===e)return 0<a.length?"module"!==c.type&&(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!==b.colorId&&"h"===c.styleTabId&&(h=w.document.getElementById(b.colorId),null!==h&&""!==h.value.trim()&&(a="none")));h=c.styleTab.getElementsByClassName("tb_image_options");for(p=h.length-1;-1<p;--p)for(l=h[p].getElementsByClassName("tb_lb_option"),m=l.length-1;-1<m;--m)n.triggerEvent(l[m],"change")}else{if("position_box"===e){c.position(a,f);return}if("checkbox"=== e){if(null!==this.closest("#background_video_options")){c.videoOptions(this,a);return}if("height"===g&&-1!==f.indexOf("_auto_height")||"width"===g&&-1!==f.indexOf("_auto_width")){a="height"===g?b.heightID:b.widthID;this.checked?c.setData(a,g,"auto"):(h=c.styleTab.querySelector("#"+a).value.trim(),""!==h?c.setData(a,g,h+u(c.styleTab).find("#"+a+"_unit").val()):c.setData(a,g,""));return}if(!0===b.is_position){h="#"+b.posId;p=this.closest(".tb_input");this.checked?a="auto":(a=p.querySelector(h).value.trim(), a=""===a||isNaN(a)?"":a+p.querySelector(h+"_unit").value);c.setLiveStyle(b.prop,a,b.selector);return}if("background-image"===g){this.checked||(a=!1);c.setLiveStyle(b.prop,a,b.selector);return}}}}c.setData(f,"",a)}},{passive:!0})})()}};q.prototype.getValue=function(a){return void 0!==this.module_rules[a]?this.module_rules[a]:!1};q.prototype.bindTabsSwitch=function(a){const b=this;if(!0===a)n.body.off("themify_builder_tabsactive.hoverTabs");else n.body.on("themify_builder_tabsactive.hoverTabs",function(a, d,g){if("styling"===ThemifyConstructor.clicked){let c;if("h"!==d.split("_").pop())for(b.$liveStyledElmt[0].classList.remove("tb_visual_hover"),c=b.$liveStyledElmt[0].getElementsByClassName("tb_visual_hover"),a=c.length-1;-1<a;--a)c[a].classList.remove("tb_visual_hover");else"module"!==b.type&&(a=g.previousElementSibling.getElementsByClassName("background_type")[0])&&(a=a.querySelector("input:checked").value,"image"===a||"gradient"===a?g.classList.remove("tb_disable_hover"):g.classList.add("tb_disable_hover")), setTimeout(function(){c=g.getElementsByClassName("tb_lb_option");let a=[];for(var d=c.length-1;-1<d;--d){var e=c[d].id,f=c[d].classList.contains("themify-gradient");!0===f&&(e=c[d].dataset.id);if(void 0!==b.module_rules[e]&&(f||null!==c[d].offsetParent))for(void 0!==b.module_rules[e].is_overlay&&b.$liveStyledElmt[0].classList.add("tb_visual_hover"),e=Array.isArray(b.module_rules[e].selector)?b.module_rules[e].selector:[b.module_rules[e].selector],f=e.length-1;-1<f;--f){let b=e[f].split(":hover")[0]; a[b]=1}}a=Object.keys(a);if(0<a.length)for(d=a.length-1;-1<d;--d)for(c=r.querySelectorAll(b.prefix+a[d]),e=c.length-1;-1<e;--e)c[e].classList.add("tb_visual_hover")},10)}})};q.prototype.getComponentBgOverlay=function(){return this.$liveStyledElmt.children(".builder_row_cover")};q.prototype.getComponentBgSlider=function(){const a="colum"===this.type&&"sub-column"===d.activeModel.get("component_name")?"sub-col":"colum"===this.type?"col":this.type;return this.$liveStyledElmt.children("."+a+"-slider")}; q.prototype.removeBgSlider=function(){this.getComponentBgSlider().add(this.$liveStyledElmt.children(".tb_backstretch")).remove();this.$liveStyledElmt.css({position:"",background:"","z-index":""})};q.prototype.removeBgVideo=function(){this.$liveStyledElmt.removeAttr("data-fullwidthvideo").data("fullwidthvideo","").children(".big-video-wrap").remove()};d.EdgeDrag={undoData:{},_onDrag:null,init(){const a=d.Utils.getMouseEvents();null===this._onDrag&&(this._onDrag=d.EdgeDrag.drag.bind(this));localStorage.getItem("tb_disable_padding_dragging")? (n.body[0].classList.add("tb_disable_padding_dragging"),d.Instances.Builder[d.builderIndex].el.removeEventListener(a.mousedown,this._onDrag,{passive:!0}),d.toolbar.el.getElementsByClassName("tb_padding_dragging_mode")[0].checked=!1):(d.Instances.Builder[d.builderIndex].el.addEventListener(a.mousedown,this._onDrag,{passive:!0}),n.body[0].classList.remove("tb_disable_padding_dragging"))},addEdgesOptions(a){a=a.closest(".tb_dragger");if(!a.getElementsByClassName("tb_dragger_lightbox")[0]){const k=a.classList.contains("tb_dragger_margin")? "margin":"padding",l=d.Models.Registry.lookup(a.closest("[data-cid]").getAttribute("data-cid"));var b=l.get("elType");b="margin"===k&&("column"===b||"row"===b);var c=["%","em","px"];const h=b?["opposite"]:["all","opposite"],p=a.classList.contains("tb_dragger_top")||a.classList.contains("tb_dragger_bottom")?"s":"e",v="1"===this.getCurrentStyling(b?"margin-top_opp_top":"checkbox_#id#_apply_all",l,k);var e=a.dataset.u||"px";const m=r.createElement("div"),n=r.createElement("ul"),q=r.createElement("ul"); m.className="tb_dragger_lightbox";q.className="tb_dragger_units";n.className="tb_dragger_types";for(var g=c.length-1;-1<g;--g){var f=r.createElement("li");f.textContent=c[g];c[g]===e&&(f.className="current");q.appendChild(f)}for(c=h.length-1;-1<c;--c)e=r.createElement("li"),g=r.createElement("span"),f=!1,e.className="tb_apply tb_apply_"+h[c],b||"opposite"!==h[c]?f=v:v||(f="#id#_opp_",f+="s"===p?"top":"left",f="1"==this.getCurrentStyling(f,l,k)),f&&(e.className+=" current"),e.appendChild(g),n.appendChild(e); m.appendChild(q);m.appendChild(n);a.getElementsByClassName("tb_dragger_options")[0].appendChild(m)}},clearEdges(){},addEdges(a,b,c){if(!("divider"===a||"row"===a&&c.classList.contains("tb-page-break"))){var e=["padding","margin"],g=["right","bottom","left","top"],f=b.get("elType"),k=[],l=g.length;for(let q=e.length-1;-1<q;--q){var h=r.createDocumentFragment(),p=e[q],v="module"===f&&"padding"===p?c.getElementsByClassName("module")[0]:c;let N,t="margin"===p&&("column"===a||"row"===a),x,u;"subrow"=== f&&"padding"===p&&(v=c.getElementsByClassName("module_subrow")[0]);v&&(v=v.children,N=v.length-1);t?"1"==this.getCurrentStyling("margin-top_opp_top",b,p)&&(x=this.getCurrentStyling("margin-top",b,p),u=this.getCurrentStyling("margin-top_unit",b,p)||"px"):"1"==this.getCurrentStyling("checkbox_#id#_apply_all",b,p)&&(x=this.getCurrentStyling("#id#_top",b,p),u=this.getCurrentStyling("#id#_top_unit",b,p)||"px");for(let c=l-1;-1<c;--c){if(!("margin"!==p||"column"!==a&&"row"!==a||"right"!==g[c]&&"left"!== g[c]))continue;let d;var m=void 0,n=u;let e=x;if(v)for(m=N;-1<m;--m)if(v[m]&&v[m].classList.contains("tb_dragger_"+g[c])&&v[m].classList.contains("tb_dragger_"+p)){d=v[m];break}if(d)m=d.getElementsByClassName("tb_dragger_value")[0];else{d=r.createElement("div");m=r.createElement("span");d.className="tb_dragger tb_dragger_"+g[c]+" tb_dragger_"+p;m.className="tb_dragger_value";let a=r.createElement("div"),b=r.createElement("span");b.className="tb_dragger_arrow";a.className="tb_dragger_options";a.tabIndex= -1;a.appendChild(m);a.appendChild(b);d.appendChild(a);h.appendChild(d)}n||(n=t?"#id#-"+g[c]:"#id#_"+g[c],e=this.getCurrentStyling(n,b,p),n=this.getCurrentStyling(n+"_unit",b,p)||"px");void 0===e||null===e||""===e||(d.dataset.u||"px")===n&&d.dataset.v===e||(d.dataset.u=n,d.dataset.v=e,m.textContent=e+n,"padding"!==p&&k.push(d))}"margin"===p||"module"!==f&&"subrow"!==f?c.appendChild(h):(v=c.getElementsByClassName("subrow"===f?"module_subrow":"module")[0])&&v.appendChild(h);if("padding"!==p)for(h=k.length- 1;-1<h;--h)this.setValueByType(k[h],a,k[h].dataset.v,k[h].dataset.u);"row"!==f&&(h="module"===f||"subrow"===f?"column":c.classList.contains("sub_column")?"subrow":"row",p=c.closest(".module_"+h),"subrow"===h&&(p=p.parentNode),this.addEdges(h,d.Models.Registry.lookup(p.dataset.cid),p))}}},optionsClick(a){a.preventDefault();a.stopPropagation();d.ActionBar.disable=!0;this.addEdgesOptions(a.target.closest(".tb_dragger_options"));a="LI"===a.target.nodeName?a.target:a.target.parentNode;"LI"===a.nodeName&& (!a.classList.contains("current")&&a.parentNode.classList.contains("tb_dragger_units")?this.changeUnit(a):a.parentNode.classList.contains("tb_dragger_types")&&this.changeApply(a));d.ActionBar.disable=null},changeUnit(a){const b=a.closest(".tb_dragger_lightbox").closest(".tb_dragger"),c=b.classList.contains("tb_dragger_padding")?"padding":"margin",e=b.classList.contains("tb_dragger_top")||b.classList.contains("tb_dragger_bottom")?"s":"e",g=a.textContent||"px";var f=b.dataset.v;const k=b.dataset.u|| "px";var l=b.parentNode;a=ThemifyStyles.getSheet(d.activeBreakPoint);const h=a.cssRules;let p=b.getElementsByClassName("tb_dragger_types")[0],n=l.children;var m=l.closest("[data-cid]");f=""!==f?this.convert(b,k,g,f):"";l=d.Models.Registry.lookup(m.getAttribute("data-cid"));let q=l.get("elType"),t=D.clone(m),w=u.extend(!0,{},l.get("module"===q?"mod_settings":"styling"));p&&(p=p.getElementsByClassName("current")[0])&&(p=p.classList.contains("tb_apply_all")?"all":"opposite");"module"===q&&(q=l.get("mod_name")); const I=ThemifyStyles.getBaseSelector(q,l.get("element_id"));m=K(h,I);r.body.classList.add("tb_edge_drag_start");for(let d=n.length-1;-1<d;--d){let k=n[d].classList;if(k.contains("tb_dragger_"+c)){var x="left";k.contains("tb_dragger_bottom")?x="bottom":k.contains("tb_dragger_right")?x="right":k.contains("tb_dragger_top")&&(x="top");if(n[d]!==b&&(!p||"opposite"===p&&("s"===e&&("left"===x||"right"===x)||"e"===e&&("top"===x||"bottom"===x))))continue;let r=n[d].getElementsByClassName("tb_dragger_units")[0], v=c+"-"+x,t="",u=f+g;x="margin"!==c||"column"!==q&&"row"!==q?"#id#_"+x:"#id#-"+x;!1!==m&&h[m]?(t=h[m].style[E(v)],h[m].style[E(v)]=u):(m=h.length,a.insertRule(I+"{"+v+":"+u+";}",m));if(r){r=r.children;for(let a=r.length-1;-1<a;--a)r[a].classList.toggle("current",r[a].textContent===g)}"em"!==g&&""!==f&&(f=Math.round(f));"padding"!==c&&this.setValueByType(n[d],q,f,g);n[d].getElementsByClassName("tb_dragger_value")[0].textContent=""===f?"":u;n[d].dataset.v=f;n[d].dataset.u=g;k.add("tb_dragger_dragged"); this.setData(l,this.getFieldId(x,l,c),f,g);this.setUndoData(m,v,u,t)}}const A=this;setTimeout(function(){for(let a=n.length-1;-1<a;--a)n[a].classList.remove("tb_dragger_dragged");r.body.classList.remove("tb_edge_drag_start");g!==k&&A.addUndo(t,w);t=w=n=null},500)},changeApply(a){const b=a.closest(".tb_dragger");var c=b.parentNode;const e=b.classList.contains("tb_dragger_padding")?"padding":"margin";var g=b.classList.contains("tb_dragger_top")||b.classList.contains("tb_dragger_bottom")?"s":"e",f=c.closest("[data-cid]"); c=d.Models.Registry.lookup(f.getAttribute("data-cid"));const k=c.get("elType");f=D.clone(f);const l=u.extend(!0,{},c.get("module"===k?"mod_settings":"styling")),h=a.classList.contains("current")?"":"1",p=a.nextSibling?a.nextElementSibling:a.previousElementSibling;let n="margin-top_opp_top",m;if("margin"!==e||"column"!==k&&"row"!==k)m="checkbox_#id#_apply_all",n="#id#_opp_"+("s"===g?"top":"left"),a.classList.contains("tb_apply_all")&&(g=n,n=m,m=g);p&&p.classList.remove("current");a.classList.toggle("current", h);this.setData(c,this.getFieldId(n,c,e),h);m&&this.setData(c,this.getFieldId(m,c,e),"");this.changeUnit(b.getElementsByClassName("tb_dragger_units")[0].getElementsByClassName("current")[0]);this.onChange();this.addUndo(f,l)},convert(a,b,c,d){if(!d)return 0;b||(b="px");c||(c="px");if(b===c)return d;let e;a=a.parentNode;if(a.classList.contains("active_module")){var f=a.classList.contains("active_subrow")?"module_subrow":"module";a=a.getElementsByClassName(f)[0]}f="em"===c||"em"===b?parseFloat(getComputedStyle(a).fontSize): null;a="%"===c||"%"===b?a.parentNode.offsetWidth:null;"px"===b?"em"===c?e=+parseFloat(d/f).toFixed(2):"%"===c&&(e=parseFloat(100*d/a)):"%"===b?(e=parseFloat(d*a/100),e="em"===c?+parseFloat(e/f).toFixed(2):parseFloat(e)):(e=parseFloat(d*f),"%"===c&&(e=parseFloat(100*e/a)),e=parseFloat(e));return Number(e.toFixed(2))},setValueByType(a,b,c,d){let e="margin";d||(d="px");const f=a.classList;for(let a=f.length-1;-1<a;--a)if("tb_dragger_top"===f[a]||"tb_dragger_bottom"===f[a]||"tb_dragger_left"===f[a]|| "tb_dragger_right"===f[a]){e+="-"+f[a].replace("tb_dragger_","");break}"px"!==d&&""!==c&&(c=this.convert(a,d,"px",c),d="px");if(void 0===c||null===c)c="";a.style["margin-top"===e||"margin-bottom"===e?"height":"width"]=""===c?"":(0<c?c:-c)+d;if("row"===b||"column"===b)a.style[e]=""===c?"":-c+d},getFieldId(a,b,c){const d=b.get("elType");b=ThemifyStyles.getStyleOptions("module"===d?b.get("mod_name"):d);"margin"===c&&("row"===d||"column"===d)||void 0!==b[c+"_top"]&&b[c+"_top"].type===c||(c=c[0]);return a.replace("#id#", c)},getCurrentStyling(a,b,c){var e=b.get("elType");e="row"===e||"column"===e||"subrow"===e?b.get("styling"):b.get("mod_settings");a=this.getFieldId(a,b,c);if(null!==d.activeModel&&d.activeModel.cid===b.cid&&(b=D.Lightbox.$lightbox[0].querySelector("#"+a),null!==b))if(b.classList.contains("themify-checkbox")){if(b=b.getElementsByClassName("tb-checkbox")[0])return b.checked?b.value:!1}else return b.value;if("desktop"===d.activeBreakPoint)return e[a];b=ThemifyConstructor.breakpointsReverse;c=b.indexOf(d.activeBreakPoint); for(let d=c,f=b.length;d<f;++d)if("desktop"!==b[d]){if(void 0!==e["breakpoint_"+b[d]]&&void 0!==e["breakpoint_"+b[d]][a]&&""!==e["breakpoint_"+b[d]][a])return e["breakpoint_"+b[d]][a]}else if(""!==e[a])return e[a]},setData(a,b,c,e){c&&e&&"em"!==e&&(c=Number(c));if(null!==d.activeModel&&a.cid===d.activeModel.cid){var g=D.Lightbox.$lightbox[0].querySelector("#"+b);if(null!==g){if(g.classList.contains("themify-checkbox")){if(g=g.getElementsByClassName("tb-checkbox")[0])g.checked=!!c}else if(g.value= c,g=D.Lightbox.$lightbox[0].querySelector("#"+b+"_unit"))g.value=e;g&&n.triggerEvent(g,"change");return}"desktop"===d.activeBreakPoint?(ThemifyConstructor.values[b]=c,e&&(ThemifyConstructor.values[b+"_unit"]=e)):(ThemifyConstructor.values["breakpoint_"+d.activeBreakPoint]||(ThemifyConstructor.values["breakpoint_"+d.activeBreakPoint]={}),ThemifyConstructor.values["breakpoint_"+d.activeBreakPoint][b]=c,e&&(ThemifyConstructor.values["breakpoint_"+d.activeBreakPoint][b+"_unit"]=e))}g="module"===a.get("elType")? "mod_settings":"styling";const f=u.extend(!0,{},a.get(g)),k={};"desktop"!==d.activeBreakPoint?(f["breakpoint_"+d.activeBreakPoint]||(f["breakpoint_"+d.activeBreakPoint]={}),f["breakpoint_"+d.activeBreakPoint][b]=c,e&&(f["breakpoint_"+d.activeBreakPoint][b+"_unit"]=e)):(c?f[b]=c:delete f[b],e&&("px"===e?delete f[b+"_unit"]:f[b+"_unit"]=e));k[g]=f;a.set(k,{silent:!0})},onChange(){setTimeout(function(){d.Utils._onResize(!0)},1500)},setUndoData(a,b,c,e){void 0===this.undoData[d.activeBreakPoint]&&(this.undoData[d.activeBreakPoint]= {});void 0===this.undoData[d.activeBreakPoint][a]&&(this.undoData[d.activeBreakPoint][a]={});b=E(b);a=this.undoData[d.activeBreakPoint][a];void 0===a[b]&&(a[b]={});a[b].a=c;void 0===a[b].b&&(a[b].b=e)},addUndo(a,b){const c=a[0].getAttribute("data-cid");if(null===d.activeModel||d.activeModel.cid!==c){var e=d.Models.Registry.lookup(c);const g=!0===d.hasChanged,f=u.extend(!0,{},this.undoData);e=u.extend(!0,{},"module"===e.get("elType")?e.get("mod_settings"):e.get("styling"));const k=D.clone(r.getElementsByClassName("tb_element_cid_"+ c)[0]);a[0].classList.remove("tb_element_clicked");k[0].classList.remove("tb_element_clicked");d.hasChanged=!0;d.undoManager.push(c,a,k,"save",{bsettings:b,asettings:e,styles:f,column:!1});d.hasChanged=g}this.undoData={}},setModulePosition(a){const b=d.ActionBar.prevExpand;if(b){var c=a.getElementsByClassName("tb_dragger_value")[0];b.style.top="";c&&c.firstChild&&(c=c.getBoundingClientRect(),b.getBoundingClientRect().bottom>=c.top&&(b.style.top=a.offsetHeight/2+c.height+"px"))}},drag(a){if("touchstart"=== a.type||1===a.which)if(a.target.closest(".tb_dragger_options")){const b=d.Utils.getMouseEvents(),c=this,e=a.target;r.addEventListener(b.mouseup,function(a){if(e===a.target){if(a.target.classList.contains("tb_dragger_arrow")){!0!==d.ActionBar.isHoverMode&&d.ActionBar.el.classList.remove("tb_show_toolbar");this.body.classList.add("tb_dragger_options_open");let a=e.closest(".tb_dragger");const b=function(e){"mouseout"!==e.type&&e.target.closest(".tb_dragger_options")||(!0!==d.ActionBar.isHoverMode&& d.ActionBar.el.classList.add("tb_show_toolbar"),r.removeEventListener("click",b,{passive:!0}),w.document.removeEventListener("click",b,{passive:!0}),a.removeEventListener("mouseleave",b,{once:!0,passive:!0}),a.classList.contains("tb_dragger_padding")&&a.classList.contains("tb_dragger_top")&&c.setModulePosition(a),r.body.classList.remove("tb_dragger_options_open"),(e=a.getElementsByClassName("tb_dragger_lightbox")[0])&&e.remove(),a=null)};a.addEventListener("mouseleave",b,{once:!0,passive:!0});this.addEventListener("click", b,{passive:!0});w.document.addEventListener("click",b,{passive:!0})}c.optionsClick(a)}},{once:!0})}else if(a.target.classList.contains("tb_dragger")){a.stopImmediatePropagation();var b=a.target,c=this,e=d.Utils.getMouseEvents(),g=b.closest("[data-cid]"),f=d.Models.Registry.lookup(g.getAttribute("data-cid"));if(f){let k=[],l,h,p=a.clientX,n=a.clientY,m,q,t,M,I,x,A,O="",B;const y=f.get("elType"),L="module"===y?f.get("mod_name"):y,C=b.classList.contains("tb_dragger_padding")?"padding":"margin",F=b.classList.contains("tb_dragger_top")|| b.classList.contains("tb_dragger_bottom")?"s":"e",J="s"===F?b.classList.contains("tb_dragger_top")?"top":"bottom":b.classList.contains("tb_dragger_left")?"left":"right",z=b.dataset.u||"px",G=function(a){a.stopImmediatePropagation();r.body.classList.add("tb_start_animate","tb_edge_drag_start");w.document.body.classList.add("tb_start_animate","tb_edge_drag_start");r.body.style.cursor=u(b).css("cursor");d.ActionBar.hideContextMenu();d.ActionBar.clear();d.ActionBar.disable=!0;(a=b.getElementsByClassName("tb_dragger_lightbox")[0])&& a.remove();c.addEdgesOptions(b);m=parseFloat(b.dataset.v)||0;m="em"!==z?parseInt(m):Number(m.toFixed(2));(q=b.getElementsByClassName("tb_dragger_types")[0])&&(q=q.getElementsByClassName("current")[0])&&(q=q.classList.contains("tb_apply_all")?"all":"opposite");t=D.clone(g);I=u.extend(!0,{},f.get("module"===y?"mod_settings":"styling"));M=null!==d.activeModel&&d.activeModel.cid===f.cid;O=ThemifyStyles.getBaseSelector(L,f.get("element_id"));x=ThemifyStyles.getSheet(d.activeBreakPoint);A=x.cssRules;B= K(A,O);l="module"===y?g.getElementsByClassName("module")[0]:"subrow"===y?g.getElementsByClassName("module_subrow")[0]:g;a=b.parentNode.children;for(let b=a.length-1;-1<b;--b){let c=a[b].classList;if(c.contains("tb_dragger_"+C)){let d="left";c.contains("tb_dragger_bottom")?d="bottom":c.contains("tb_dragger_right")?d="right":c.contains("tb_dragger_top")&&(d="top");if(J===d||q&&("opposite"!==q||("s"!==F||"left"!==d&&"right"!==d)&&("e"!==F||"top"!==d&&"bottom"!==d)))a[b].classList.add("tb_dragger_dragged"), k.push({el:a[b],prop:C+"-"+d,text:a[b].getElementsByClassName("tb_dragger_value")[0]})}}g.classList.add("tb_element_clicked")},H=function(a){a.stopImmediatePropagation();h&&cancelAnimationFrame(h);h=requestAnimationFrame(function(){var e=a.clientX,f=a.clientY;var g="px"===z||"%"===z?1:.1;var h=b.getBoundingClientRect();var q="e"===F?"left"===J?e-h.right:h.left-e:"top"===J?f-h.bottom:h.top-f;if("e"===F&&40<h.width&&(e<h.left||e>h.right)||"s"===F&&40<h.height&&(f<h.top||f>h.bottom))if("%"===z&&65<m|| "px"===z&&51<m||"em"===z&&1.5<m)0>q&&(q*=-1),50<q&&(g=100<q?300<q?6*g:g*(150<q?200<q?5:4:3):2*g);"e"===F?e!==n&&(m=e>n?"left"===J?m+g:m-g:"left"===J?m-g:m+g):f!==p&&(m=f>p?m+g:m-g);n=e;p=f;0>m&&"padding"===C?m=0:0!==m%1&&(m=parseFloat(m.toFixed(1)));e=m+z;for(f=k.length-1;-1<f;--f){g=k[f].prop;h=k[f].el;q=k[f].text;l.style[g]=e;!0===M&&d.liveStylingInstance.setLiveStyle(g,e,O);if("margin"===C){let a=h.classList.contains("tb_dragger_top")||h.classList.contains("tb_dragger_bottom")?"height":"width", b=m,d=z;"px"!==d&&(b=c.convert(h,d,"px",b),d="px");if("row"===y||"column"===y)h.style[g]=""===e?"":-b+d;h.style[a]=0>m?-b+d:b+d}q.textContent=0===m?"":e}})};r.addEventListener(e.mouseup,function(a){this.removeEventListener(e.mousemove,G,{passive:!0,once:!0});this.removeEventListener(e.mousemove,H,{passive:!0});t&&(h&&cancelAnimationFrame(h),this.body.style.cursor="",this.body.classList.remove("tb_start_animate","tb_edge_drag_start"),w.document.body.classList.remove("tb_start_animate","tb_edge_drag_start"), requestAnimationFrame(function(){g.classList.remove("tb_element_clicked");for(let b=k.length-1;-1<b;--b){let d=k[b].el,e=k[b].prop,g=l.style[e];var a=e.replace(C+"-","");let h="";a="margin"!==C||"column"!==y&&"row"!==y?"#id#_"+a:"#id#-"+a;let n=d.getElementsByClassName("tb_dragger_lightbox")[0];0===m&&"margin"===C&&(d.style[E(k[b].prop)]=d.style.width=d.style.height="");n&&n.remove();!1!==B&&A[B]?(h=A[B].style[E(e)],A[B].style[E(e)]=g):(B=A.length,x.insertRule(O+"{"+e+":"+g+";}",B));l.style[e]=""; !1===M&&c.setUndoData(B,e,g,h);d.dataset.v=m;d.dataset.u=z;d.classList.remove("tb_dragger_dragged");c.setData(f,c.getFieldId(a,f,C),m,z)}"padding"===C&&"top"===J&&"module"===y&&c.setModulePosition(k[0].el);c.onChange();!1===M&&c.addUndo(t,I);d.ActionBar.disable=q=l=d.ActionBar.hoverCid=h=x=A=B=O=M=k=t=I=m=p=n=null;d.hasChanged=!0}))},{once:!0,passive:!0});r.addEventListener(e.mousemove,G,{passive:!0,once:!0});r.addEventListener(e.mousemove,H,{passive:!0})}}}};d.createStyleInstance=function(){return new q}})(jQuery, Themify,window,window.top,document,tb_app,ThemifyBuilderCommon);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка