!function(a,b){var c=function(){function c(a){return a&&b.pressThisL10n?b.pressThisL10n[a]||a:a||""}function d(a){return a=a||"",a.replace(/|$)/g,"").replace(/<(script|style)[^>]*>[\s\S]*?(<\/\1>|$)/gi,"").replace(/<\/?[a-z][\s\S]*?(>|$)/gi,"")}function e(a){var b=d(a);try{G.innerHTML=b,b=d(G.value)}catch(c){}return b}function f(b){return b=a.trim(b||""),/^(?:https?:)?\/\//.test(b)?(b=d(b),b.replace(/["\\]+/g,"")):""}function g(){a(".spinner").addClass("is-active"),a(".post-actions button").each(function(){a(this).attr("disabled","disabled")})}function h(){a(".spinner").removeClass("is-active"),a(".post-actions button").each(function(){a(this).removeAttr("disabled")})}function i(){var b=a("#title-container");return b.find("img.emoji").each(function(){var b=a(this);b.replaceWith(a("").text(b.attr("alt")))}),e(b.text())}function j(){var c=a("#pressthis-form"),d=a('');C&&C.save(),a("#post_title").val(i()),b.tagBox&&a("div.tagsdiv").each(function(){b.tagBox.flushTags(this,!1,1)}),a(".categories-select .category").each(function(b,e){var f=a(e);f.hasClass("selected")&&c.append(d.clone().val(f.attr("data-term-id")||""))})}function k(d){var e;F=!1,g(),"publish"===d&&a("#post_status").val("publish"),j(),e=a("#pressthis-form").serialize(),a.ajax({type:"post",url:b.ajaxurl,data:e}).always(function(){h()}).done(function(a){if(a.success)if(a.data.redirect)if(b.opener&&I.redirInParent){try{b.opener.location.href=a.data.redirect}catch(c){}b.self.close()}else b.location.href=a.data.redirect;else a.data.postSaved;else p(a.data.errorMessage)}).fail(function(){p(c("serverError"))})}function l(a){var b,c,d="";C&&(b=f(a.attr("data-wp-src")||""),c=f(J.u),a.hasClass("is-image")?(c||(c=b),d=''):d="[embed]"+b+"[/embed]",L?C.execCommand("mceInsertContent",!1,d):C.setContent("

"+d+"

"+C.getContent()))}function m(){var c,d=a("#new-category").val();d&&(c={action:"press-this-add-category",post_id:a("#post_ID").val()||0,name:d,new_cat_nonce:a("#_ajax_nonce-add-category").val()||"",parent:a("#new-category-parent").val()||0},a.post(b.ajaxurl,c,function(b){if(b.success){var c,d,e=a("ul.categories-select");a.each(b.data,function(b,f){var g=a("
  • ").append(a('