!function($){$("#wpbody").on("click",".insert-media-plugin",function(t){t.preventDefault();var e=$(this).data("input"),i=$(this).data("output");if(n)return void n.open();var n=wp.media({title:"Choose Image",button:{text:"Select"},multiple:!1});n.on("select",function(){var t=n.state().get("selection").first(),a=t.get("id"),u=t.get("url");$("input#"+e).val(a),$("img#"+i).attr("src",u)}),n.open()}),$("#wpbody").on("click",".delete-media-plugin",function(t){t.preventDefault();var e=$(this).data("input"),i=$(this).data("output");$("input#"+e).val(""),$("img#"+i).attr("src","")})}(jQuery);