!function(e){"use strict";function i(e){return(e=e.toLowerCase()).replace("jnews_module","jnews")}function t(){window.InlineShortcodeView&&function(){for(var e=0;e<jnewsmodule.length;e++)!function(){var t=jnewsmodule[e],n="InlineShortcodeView_"+i(t.name);window[n]=window.InlineShortcodeView.extend({render:function(){var e=this.model.get("id");return window[n].__super__.render.call(this),vc.frame_window.vc_iframe.addActivity((function(){"post"===t.type&&"function"==typeof this.jnews_iframe.post_js&&this.jnews_iframe.post_js(e),"block"===t.type&&"function"==typeof this.jnews_iframe.module_js&&this.jnews_iframe.module_js(e),"hero"===t.type&&"function"==typeof this.jnews_iframe.hero_js&&this.jnews_iframe.hero_js(e),"newsticker"===t.type&&"function"==typeof this.jnews_iframe.newsticker_js&&this.jnews_iframe.newsticker_js(e),"video_playlist"===t.type&&"function"==typeof this.jnews_iframe.video_playlist_js&&this.jnews_iframe.video_playlist_js(e),"block_link"===t.type&&"function"==typeof this.jnews_iframe.block_link_module&&this.jnews_iframe.block_link_module(e),"slider"===t.type&&"function"==typeof this.jnews_iframe.slider&&this.jnews_iframe.slider(e),"carousel"===t.type&&"function"==typeof this.jnews_iframe.carousel&&this.jnews_iframe.carousel(e),"widget"===t.type&&"function"==typeof this.jnews_iframe.widget&&this.jnews_iframe.widget(e),this.jnews_iframe.trigger_event(e)})),this}})}();window.InlineShortcodeView_vc_widget_sidebar=window.InlineShortcodeView.extend({render:function(){var e=this.model.get("id");return window.InlineShortcodeView_vc_widget_sidebar.__super__.render.call(this),vc.frame_window.vc_iframe.addActivity((function(){"function"==typeof this.jnews_iframe.module_js&&this.jnews_iframe.widget(e)})),this}})}()}window.vc&&window.vc.events&&window.vc.events.on("shortcodeView:ready",(function(e){var i=e.get("shortcode"),t=e.get("id");"vc_row"===i&&vc.frame_window.jnews_iframe.additional_row_option(t),"vc_column"===i&&vc.frame_window.jnews_iframe.sidebar_follow(t)})),window.vc&&window.vc.ShortcodesBuilder&&(window.vc.ShortcodesBuilder.prototype.build=function(i,t){var n=vc.shortcodes.get(this.lastID()).get("parent_id"),o=vc.frame_window.vc_iframe.size_container(n);this.ajax({action:"vc_load_shortcode",shortcodes:i,_vcnonce:window.vcAdminNonce,colwidth:o},vc.frame_window.location.href).done((function(i){_.each(e(i),(function(e){this._renderBlockCallback(e)}),this),_.isFunction(t)&&t(i),vc.frame.setSortable(),vc.activity=!1,this.checkNoContent(),vc.frame_window.vc_iframe.loadScripts(),this.last()&&vc.frame.scrollTo(this.first()),this.models=[],this.showResultMessage(),this.is_build_complete=!0}))},window.vc.ShortcodesBuilder.prototype.update=function(i){var t,n,o=i.get("parent_id"),s=vc.frame_window.vc_iframe.size_container(o);t=i.get("shortcode"),n=this.toString(i),vc.setDataChanged(),this.ajax({action:"vc_load_shortcode",shortcodes:[{id:i.get("id"),string:n,tag:t}],_vcnonce:window.vcAdminNonce,colwidth:s},vc.frame_window.location.href).done((function(t){var n;n=i.view,_.each(e(t),(function(e){this._renderBlockCallback(e)}),this),i.view&&(i.view.$el.insertAfter(n.$el),vc.shortcodes.where({parent_id:i.get("id")}).length&&n.content().find("> *").appendTo(i.view.content()),n.remove(),vc.frame_window.vc_iframe.loadScripts(),i.view.changed(),vc.frame.setSortable(),i.view.updated())}))}),e((function(){t()}))}(jQuery);