var ajaxWidgets,ajaxPopulateWidgets,quickPressLoad;window.wp=window.wp||{},jQuery(document).ready(function(c){var t,n=c("#welcome-panel"),e=c("#wp_welcome_panel-hide");t=function(e){c.post(ajaxurl,{action:"update-welcome-panel",visible:e,welcomepanelnonce:c("#welcomepanelnonce").val()})},n.hasClass("hidden")&&e.prop("checked")&&n.removeClass("hidden"),c(".welcome-panel-close, .welcome-panel-dismiss a",n).click(function(e){e.preventDefault(),n.addClass("hidden"),t(0),c("#wp_welcome_panel-hide").prop("checked",!1)}),e.click(function(){n.toggleClass("hidden",!this.checked),t(this.checked?1:0)});var i,o,a=c("#try-gutenberg-panel"),s=c("#wp_try_gutenberg_panel-hide");i=function(e){c.post(ajaxurl,{action:"update-try-gutenberg-panel",visible:e,trygutenbergpanelnonce:c("#trygutenbergpanelnonce").val()})},o=function(e){e.activateUrl+="&from=try-gutenberg",e.activateLabel=wp.updates.l10n.activatePluginLabel.replace("%s",e.pluginName),wp.updates.installPluginSuccess(e)},a.hasClass("hidden")&&s.prop("checked")&&a.removeClass("hidden"),c(".try-gutenberg-panel-close, .try-gutenberg-panel-dismiss a",a).click(function(e){e.preventDefault(),a.addClass("hidden"),i(0),c("#wp_try_gutenberg_panel-hide").prop("checked",!1)}),s.click(function(){a.toggleClass("hidden",!this.checked),i(this.checked?1:0)}),a.on("click",".install-now",function(e){e.preventDefault();var t={slug:c(e.target).data("slug"),success:o};wp.updates.installPlugin(t)}),ajaxWidgets=["dashboard_primary"],(ajaxPopulateWidgets=function(e){function t(e,t){var n,i=c("#"+t+" div.inside:visible").find(".widget-loading");i.length&&(n=i.parent(),setTimeout(function(){n.load(ajaxurl+"?action=dashboard-widgets&widget="+t+"&pagenow="+pagenow,"",function(){n.hide().slideDown("normal",function(){c(this).css("display","")})})},500*e))}e?(e=e.toString(),-1!==c.inArray(e,ajaxWidgets)&&t(0,e)):c.each(ajaxWidgets,t)})(),postboxes.add_postbox_toggles(pagenow,{pbshow:ajaxPopulateWidgets}),(quickPressLoad=function(){var t,e=c("#quickpost-action");c('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!1),t=c("#quick-press").submit(function(e){e.preventDefault(),c("#dashboard_quick_press #publishing-action .spinner").show(),c('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!0),c.post(t.attr("action"),t.serializeArray(),function(e){var t;c("#dashboard_quick_press .inside").html(e),c("#quick-press").removeClass("initial-form"),quickPressLoad(),(t=c(".drafts ul li").first()).css("background","#fffbe5"),setTimeout(function(){t.css("background","none")},1e3),c("#title").focus()})}),c("#publish").click(function(){e.val("post-quickpress-publish")}),c("#title, #tags-input, #content").each(function(){var e=c(this),t=c("#"+this.id+"-prompt-text");""===this.value&&t.removeClass("screen-reader-text"),t.click(function(){c(this).addClass("screen-reader-text"),e.focus()}),e.blur(function(){""===this.value&&t.removeClass("screen-reader-text")}),e.focus(function(){t.addClass("screen-reader-text")})}),c("#quick-press").on("click focusin",function(){wpActiveEditor="content"}),function(){if(document.documentMode&&document.documentMode<9)return;c("body").append('
');var i=c(".quick-draft-textarea-clone"),o=c("#content"),a=o.height(),s=c(window).height()-100;i.css({"font-family":o.css("font-family"),"font-size":o.css("font-size"),"line-height":o.css("line-height"),"padding-bottom":o.css("paddingBottom"),"padding-left":o.css("paddingLeft"),"padding-right":o.css("paddingRight"),"padding-top":o.css("paddingTop"),"white-space":"pre-wrap","word-wrap":"break-word",display:"none"}),o.on("focus input propertychange",function(){var e=c(this),t=e.val()+" ",n=i.css("width",e.css("width")).text(t).outerHeight()+2;o.css("overflow-y","auto"),n===a||s<=n&&s<=a||(a=s