!function(){var e={831:function(){jQuery(document).ready(function(e){var t=e(document);t.on("click",".cwp-media-image-upload",function(t){t.preventDefault();var i=e(this).data("title"),a=e(this).data("button"),o=e(this).prev(),r=e(this).siblings(".cwp-image-preview-wrap");meta_image_frame=wp.media.frames.meta_image_frame=wp.media({title:i,button:{text:a},library:{type:"image"}}),meta_image_frame.open(),meta_image_frame.on("select",function(){var t=meta_image_frame.state().get("selection").first().toJSON();o.val(t.id);var i=e("<img />",{src:t.url});r.html(i),r.show(),o.trigger("change")})}),t.on("click",".cwp-media-image-remove",function(t){e(this).siblings(".cwp-image-preview-wrap").html(""),e(this).prev().prev().val("")}),t.on("click",".cwp-media-video-upload",function(t){t.preventDefault();var i=e(this).data("title"),a=e(this).data("button"),o=e(this).prev(),r=e(this).siblings(".cwp-video-preview-wrap");meta_image_frame=wp.media.frames.meta_image_frame=wp.media({title:i,button:{text:a},library:{type:"video/MP4"}}),meta_image_frame.open(),meta_image_frame.on("select",function(){var t=meta_image_frame.state().get("selection").first().toJSON();console.log(t),o.val(t.id);var i=e("<video />",{id:"video",src:t.url,type:"video/mp4",controls:!0});r.html(i),r.show(),o.trigger("change")})}),t.on("click",".cwp-media-video-remove",function(t){e(this).siblings(".cwp-video-preview-wrap").html(""),e(this).prev().prev().val("")}),e("#cosmoswp_banner_options_layout").change(function(){var t=e(this).find(":selected").val(),i=e(".cosmoswp-custom-banner-options"),a=e(".cosmoswp-custom-banner-item");"custom"===t?(i.show(),a.show()):(i.hide(),a.hide())}).trigger("change"),e("#cosmoswp_custom_banner_layout_options").change(function(){var t=e(this).find(":selected").val(),i=e(".cosmoswp-banner-img-wrap"),a=e(".cosmoswp-banner-color-wrap"),o=e(".cosmoswp-banner-video-wrap");"normal-image"===t||"bg-image"===t?(i.show(),i.siblings().hide()):"color"===t?(a.show(),a.siblings().hide()):"video"===t&&(o.show(),o.siblings().hide())}).trigger("change")})}},t={};function i(a){var o=t[a];if(void 0!==o)return o.exports;var r=t[a]={exports:{}};return e[a](r,r.exports,i),r.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var a in t)i.o(t,a)&&!i.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";i(831)}()}();