!function(e){function t(s){if(n[s])return n[s].exports;var i=n[s]={i:s,l:!1,exports:{}};return e[s].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,s){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:s})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/assets/js/",t(t.s=45)}({0:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e){this.args=e}return e.prototype.request=function(){var e=this;jQuery.ajax({type:"POST",data:{action:"epsilon_framework_ajax_action",args:e.args},dataType:"json",url:EpsilonWPUrls.ajaxurl,success:function(t){e.result=t,jQuery(e).trigger("epsilon-received-success")},error:function(e,t,n){console.log(e+" :: "+t+" :: "+n)}})},e}();t.EpsilonAjaxRequest=s},29:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),i=function(){function e(){wp.customize.preview.bind("update-inline-color-schemes-css",function(e){var t,n={action:[e.class,e.action],nonce:EpsilonWPUrls.ajax_nonce,args:e.data,id:e.id};t=new s.EpsilonAjaxRequest(n),t.request(),jQuery(t).on("epsilon-received-success",function(n){var s=e.action+e.id,i=jQuery("#epsilon-stylesheet-"+s);i.length||(i=jQuery("body").append('<style type="text/css" id="epsilon-stylesheet-'+s+'" />').find("#epsilon-stylesheet-"+s)),i.html()!==t.result.css&&i.html(t.result.css)})})}return e}();t.EpsilonColorSchemesPreviewer=i},30:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),i=function(){function e(){this.sections=[],this.registerSections(),this.handleEvents()}return e.prototype.registerSections=function(){for(var e=this,t=jQuery("[data-customizer-section-id]"),n=0;n<t.length;n++){var s=jQuery(t[n]).attr("data-section"),i={id:parseInt(s),section:jQuery(t[n])};e.sections.push(i)}},e.prototype.handleEvents=function(){var e=this;wp.customize.preview.bind("updated-section-repeater",_.debounce(function(t){e.changeSection(t)},300))},e.prototype.changeSection=function(e){var t,n=this,i={action:["Epsilon_Page_Generator","generate_partial_section"],nonce:EpsilonWPUrls.ajax_nonce,args:{control:e.control,postId:e.postId,id:e.index,value:e.value}};t=new s.EpsilonAjaxRequest(i),t.request(),this.standBySection(n.sections[e.index].section),jQuery(t).on("epsilon-received-success",function(s){n.liveSection(e.index,n.sections[e.index].section,t.result.section),jQuery(document).trigger("epsilon-selective-refresh-ready")})},e.prototype.standBySection=function(e){e.animate({opacity:.5})},e.prototype.liveSection=function(e,t,n){var s=this;t.replaceWith(n),s.sections=[],s.registerSections(),t.animate({opacity:1})},e}();t.EpsilonPartialRefresh=i},31:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(){jQuery(document).on("click",".epsilon-section-editor",function(e){e.preventDefault();var t={section:jQuery(this).parents("[data-section]").attr("data-section"),customizerSection:jQuery(this).parents("[data-section]").attr("data-customizer-section-id")};wp.customize.preview.send("epsilon-section-edit",t)})}return e}();t.EpsilonSectionEditorPreviewer=s},32:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),i=function(){function e(){wp.customize.preview.bind("update-inline-typography-css",function(e){var t,n,i={action:[e.class,e.action],nonce:EpsilonWPUrls.ajax_nonce,args:e.data,id:e.id};n=new s.EpsilonAjaxRequest(i),n.request(),jQuery(n).on("epsilon-received-success",function(e){t=jQuery("#"+n.result.stylesheet+"-inline-css"),t.length||(t=jQuery("body").append('<style type="text/css" id="'+n.result.stylesheet+'-inline-css" />').find("#"+n.result.stylesheet+"-inline-css"));for(var s=0;s<n.result.fonts.length;s++)jQuery('link[href="https://fonts.googleapis.com/css?family='+n.result.fonts[s]+'"]').length||jQuery("head").append('<link href="https://fonts.googleapis.com/css?family='+n.result.fonts[s]+'" rel="stylesheet">');t.html(n.result.css)})})}return e}();t.EpsilonTypographyPreviewer=i},45:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=n(29),i=n(32),o=n(31),r=n(30);wp.customize.bind("preview-ready",function(){new s.EpsilonColorSchemesPreviewer,new i.EpsilonTypographyPreviewer,new o.EpsilonSectionEditorPreviewer,new r.EpsilonPartialRefresh})}});
//# sourceMappingURL=epsilon-framework-previewer.js.map