Your IP : 216.73.216.162


Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/
Upload File :
Current File : /home/x/b/o/xbodynamge/namtation/wp-content/updates.min.js.tar

home/xbodynamge/www/wp-admin/js/updates.min.js000064400000105561151114320020015367 0ustar00!function(r,o,d){var p=r(document);(o=o||{}).updates={},o.updates.ajaxNonce=d.ajax_nonce,o.updates.l10n=d.l10n,o.updates.searchTerm="",o.updates.shouldRequestFilesystemCredentials=!1,o.updates.filesystemCredentials={ftp:{host:"",username:"",password:"",connectionType:""},ssh:{publicKey:"",privateKey:""},fsNonce:"",available:!1},o.updates.ajaxLocked=!1,o.updates.adminNotice=o.template("wp-updates-admin-notice"),o.updates.queue=[],o.updates.$elToReturnFocusToFromCredentialsModal=void 0,o.updates.addAdminNotice=function(e){var t,a=r(e.selector);delete e.selector,t=o.updates.adminNotice(e),(a=!a.length?r("#"+e.id):a).length?a.replaceWith(t):"customize"===pagenow?r(".customize-themes-notifications").append(t):r(".wrap").find("> h1").after(t),p.trigger("wp-updates-notice-added")},o.updates.ajax=function(e,t){var a={};return o.updates.ajaxLocked?(o.updates.queue.push({action:e,data:t}),r.Deferred()):(o.updates.ajaxLocked=!0,t.success&&(a.success=t.success,delete t.success),t.error&&(a.error=t.error,delete t.error),a.data=_.extend(t,{action:e,_ajax_nonce:o.updates.ajaxNonce,_fs_nonce:o.updates.filesystemCredentials.fsNonce,username:o.updates.filesystemCredentials.ftp.username,password:o.updates.filesystemCredentials.ftp.password,hostname:o.updates.filesystemCredentials.ftp.hostname,connection_type:o.updates.filesystemCredentials.ftp.connectionType,public_key:o.updates.filesystemCredentials.ssh.publicKey,private_key:o.updates.filesystemCredentials.ssh.privateKey}),o.ajax.send(a).always(o.updates.ajaxAlways))},o.updates.ajaxAlways=function(e){e.errorCode&&"unable_to_connect_to_filesystem"===e.errorCode||(o.updates.ajaxLocked=!1,o.updates.queueChecker()),void 0!==e.debug&&window.console&&window.console.log&&_.map(e.debug,function(e){window.console.log(r("<p />").html(e).text())})},o.updates.refreshCount=function(){var e,t=r("#wp-admin-bar-updates"),a=r('a[href="update-core.php"] .update-plugins'),s=r('a[href="plugins.php"] .update-plugins'),n=r('a[href="themes.php"] .update-plugins');t.find(".ab-item").removeAttr("title"),t.find(".ab-label").text(d.totals.counts.total),0===d.totals.counts.total&&t.find(".ab-label").parents("li").remove(),a.each(function(e,t){t.className=t.className.replace(/count-\d+/,"count-"+d.totals.counts.total)}),0<d.totals.counts.total?a.find(".update-count").text(d.totals.counts.total):a.remove(),s.each(function(e,t){t.className=t.className.replace(/count-\d+/,"count-"+d.totals.counts.plugins)}),0<d.totals.counts.total?s.find(".plugin-count").text(d.totals.counts.plugins):s.remove(),n.each(function(e,t){t.className=t.className.replace(/count-\d+/,"count-"+d.totals.counts.themes)}),0<d.totals.counts.total?n.find(".theme-count").text(d.totals.counts.themes):n.remove(),"plugins"===pagenow||"plugins-network"===pagenow?e=d.totals.counts.plugins:"themes"!==pagenow&&"themes-network"!==pagenow||(e=d.totals.counts.themes),0<e?r(".subsubsub .upgrade .count").text("("+e+")"):(r(".subsubsub .upgrade").remove(),r(".subsubsub li:last").html(function(){return r(this).children()}))},o.updates.decrementCount=function(e){d.totals.counts.total=Math.max(--d.totals.counts.total,0),"plugin"===e?d.totals.counts.plugins=Math.max(--d.totals.counts.plugins,0):"theme"===e&&(d.totals.counts.themes=Math.max(--d.totals.counts.themes,0)),o.updates.refreshCount(e)},o.updates.updatePlugin=function(e){var t,a,s;return e=_.extend({success:o.updates.updatePluginSuccess,error:o.updates.updatePluginError},e),"plugins"===pagenow||"plugins-network"===pagenow?(a=(t=r('tr[data-plugin="'+e.plugin+'"]')).find(".update-message").removeClass("notice-error").addClass("updating-message notice-warning").find("p"),s=o.updates.l10n.pluginUpdatingLabel.replace("%s",t.find(".plugin-title strong").text())):"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||(a=(t=r(".plugin-card-"+e.slug)).find(".update-now").addClass("updating-message"),s=o.updates.l10n.pluginUpdatingLabel.replace("%s",a.data("name")),t.removeClass("plugin-card-update-failed").find(".notice.notice-error").remove()),a.html()!==o.updates.l10n.updating&&a.data("originaltext",a.html()),a.attr("aria-label",s).text(o.updates.l10n.updating),p.trigger("wp-plugin-updating",e),o.updates.ajax("update-plugin",e)},o.updates.updatePluginSuccess=function(e){var t,a,s;"plugins"===pagenow||"plugins-network"===pagenow?(a=(t=r('tr[data-plugin="'+e.plugin+'"]').removeClass("update").addClass("updated")).find(".update-message").removeClass("updating-message notice-warning").addClass("updated-message notice-success").find("p"),s=t.find(".plugin-version-author-uri").html().replace(e.oldVersion,e.newVersion),t.find(".plugin-version-author-uri").html(s)):"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||(a=r(".plugin-card-"+e.slug).find(".update-now").removeClass("updating-message").addClass("button-disabled updated-message")),a.attr("aria-label",o.updates.l10n.pluginUpdatedLabel.replace("%s",e.pluginName)).text(o.updates.l10n.pluginUpdated),o.a11y.speak(o.updates.l10n.updatedMsg,"polite"),o.updates.decrementCount("plugin"),p.trigger("wp-plugin-update-success",e)},o.updates.updatePluginError=function(e){var t,a,s;o.updates.isValidResponse(e,"update")&&(o.updates.maybeHandleCredentialError(e,"update-plugin")||(s=o.updates.l10n.updateFailed.replace("%s",e.errorMessage),"plugins"===pagenow||"plugins-network"===pagenow?((a=(e.plugin?r('tr[data-plugin="'+e.plugin+'"]'):r('tr[data-slug="'+e.slug+'"]')).find(".update-message")).removeClass("updating-message notice-warning").addClass("notice-error").find("p").html(s),e.pluginName?a.find("p").attr("aria-label",o.updates.l10n.pluginUpdateFailedLabel.replace("%s",e.pluginName)):a.find("p").removeAttr("aria-label")):"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||((t=r(".plugin-card-"+e.slug).addClass("plugin-card-update-failed").append(o.updates.adminNotice({className:"update-message notice-error notice-alt is-dismissible",message:s}))).find(".update-now").text(o.updates.l10n.updateFailedShort).removeClass("updating-message"),e.pluginName?t.find(".update-now").attr("aria-label",o.updates.l10n.pluginUpdateFailedLabel.replace("%s",e.pluginName)):t.find(".update-now").removeAttr("aria-label"),t.on("click",".notice.is-dismissible .notice-dismiss",function(){setTimeout(function(){t.removeClass("plugin-card-update-failed").find(".column-name a").focus(),t.find(".update-now").attr("aria-label",!1).text(o.updates.l10n.updateNow)},200)})),o.a11y.speak(s,"assertive"),p.trigger("wp-plugin-update-error",e)))},o.updates.installPlugin=function(e){var t=r(".plugin-card-"+e.slug),a=t.find(".install-now");return e=_.extend({success:o.updates.installPluginSuccess,error:o.updates.installPluginError},e),(a="import"===pagenow?r('[data-slug="'+e.slug+'"]'):a).html()!==o.updates.l10n.installing&&a.data("originaltext",a.html()),a.addClass("updating-message").attr("aria-label",o.updates.l10n.pluginInstallingLabel.replace("%s",a.data("name"))).text(o.updates.l10n.installing),o.a11y.speak(o.updates.l10n.installingMsg,"polite"),t.removeClass("plugin-card-install-failed").find(".notice.notice-error").remove(),p.trigger("wp-plugin-installing",e),o.updates.ajax("install-plugin",e)},o.updates.installPluginSuccess=function(e){var t=r(".plugin-card-"+e.slug).find(".install-now");t.removeClass("updating-message").addClass("updated-message installed").attr("aria-label",o.updates.l10n.pluginInstalledLabel.replace("%s",e.pluginName)).text(o.updates.l10n.pluginInstalled),t.hasClass("button-primary")?t.addClass("button-primary-disabled"):t.addClass("button-disabled"),o.a11y.speak(o.updates.l10n.installedMsg,"polite"),p.trigger("wp-plugin-install-success",e),e.activateUrl&&setTimeout(function(){t.removeClass("install-now installed button-primary-disabled button-secondary-disabled button-disabled updated-message").addClass("activate-now").attr("href",e.activateUrl).attr("aria-label",o.updates.l10n.activatePluginLabel.replace("%s",e.pluginName)).text(e.activateLabel||o.updates.l10n.activatePlugin)},1e3)},o.updates.installPluginError=function(e){var t,a=r(".plugin-card-"+e.slug),s=a.find(".install-now");o.updates.isValidResponse(e,"install")&&(o.updates.maybeHandleCredentialError(e,"install-plugin")||(t=o.updates.l10n.installFailed.replace("%s",e.errorMessage),a.addClass("plugin-card-update-failed").append('<div class="notice notice-error notice-alt is-dismissible"><p>'+t+"</p></div>"),a.on("click",".notice.is-dismissible .notice-dismiss",function(){setTimeout(function(){a.removeClass("plugin-card-update-failed").find(".column-name a").focus()},200)}),s.removeClass("updating-message").addClass("button-disabled").attr("aria-label",o.updates.l10n.pluginInstallFailedLabel.replace("%s",s.data("name"))).text(o.updates.l10n.installFailedShort),o.a11y.speak(t,"assertive"),p.trigger("wp-plugin-install-error",e)))},o.updates.installImporterSuccess=function(e){o.updates.addAdminNotice({id:"install-success",className:"notice-success is-dismissible",message:o.updates.l10n.importerInstalledMsg.replace("%s",e.activateUrl+"&from=import")}),r('[data-slug="'+e.slug+'"]').removeClass("install-now updating-message").addClass("activate-now").attr({href:e.activateUrl+"&from=import","aria-label":o.updates.l10n.activateImporterLabel.replace("%s",e.pluginName)}).text(o.updates.l10n.activateImporter),o.a11y.speak(o.updates.l10n.installedMsg,"polite"),p.trigger("wp-importer-install-success",e)},o.updates.installImporterError=function(e){var t=o.updates.l10n.installFailed.replace("%s",e.errorMessage),a=r('[data-slug="'+e.slug+'"]'),s=a.data("name");o.updates.isValidResponse(e,"install")&&(o.updates.maybeHandleCredentialError(e,"install-plugin")||(o.updates.addAdminNotice({id:e.errorCode,className:"notice-error is-dismissible",message:t}),a.removeClass("updating-message").text(o.updates.l10n.installNow).attr("aria-label",o.updates.l10n.installNowLabel.replace("%s",s)),o.a11y.speak(t,"assertive"),p.trigger("wp-importer-install-error",e)))},o.updates.deletePlugin=function(e){var t=r('[data-plugin="'+e.plugin+'"]').find(".row-actions a.delete");return e=_.extend({success:o.updates.deletePluginSuccess,error:o.updates.deletePluginError},e),t.html()!==o.updates.l10n.deleting&&t.data("originaltext",t.html()).text(o.updates.l10n.deleting),o.a11y.speak(o.updates.l10n.deleting,"polite"),p.trigger("wp-plugin-deleting",e),o.updates.ajax("delete-plugin",e)},o.updates.deletePluginSuccess=function(i){r('[data-plugin="'+i.plugin+'"]').css({backgroundColor:"#faafaa"}).fadeOut(350,function(){var e=r("#bulk-action-form"),t=r(".subsubsub"),a=r(this),s=e.find("thead th:not(.hidden), thead td").length,n=o.template("item-deleted-row"),l=d.plugins;a.hasClass("plugin-update-tr")||a.after(n({slug:i.slug,plugin:i.plugin,colspan:s,name:i.pluginName})),a.remove(),-1!==_.indexOf(l.upgrade,i.plugin)&&(l.upgrade=_.without(l.upgrade,i.plugin),o.updates.decrementCount("plugin")),-1!==_.indexOf(l.inactive,i.plugin)&&(l.inactive=_.without(l.inactive,i.plugin),l.inactive.length?t.find(".inactive .count").text("("+l.inactive.length+")"):t.find(".inactive").remove()),-1!==_.indexOf(l.active,i.plugin)&&(l.active=_.without(l.active,i.plugin),l.active.length?t.find(".active .count").text("("+l.active.length+")"):t.find(".active").remove()),-1!==_.indexOf(l.recently_activated,i.plugin)&&(l.recently_activated=_.without(l.recently_activated,i.plugin),l.recently_activated.length?t.find(".recently_activated .count").text("("+l.recently_activated.length+")"):t.find(".recently_activated").remove()),l.all=_.without(l.all,i.plugin),l.all.length?t.find(".all .count").text("("+l.all.length+")"):(e.find(".tablenav").css({visibility:"hidden"}),t.find(".all").remove(),e.find("tr.no-items").length||e.find("#the-list").append('<tr class="no-items"><td class="colspanchange" colspan="'+s+'">'+o.updates.l10n.noPlugins+"</td></tr>"))}),o.a11y.speak(o.updates.l10n.pluginDeleted,"polite"),p.trigger("wp-plugin-delete-success",i)},o.updates.deletePluginError=function(e){var t,a=o.template("item-update-row"),s=o.updates.adminNotice({className:"update-message notice-error notice-alt",message:e.errorMessage}),n=e.plugin?(t=r('tr.inactive[data-plugin="'+e.plugin+'"]')).siblings('[data-plugin="'+e.plugin+'"]'):(t=r('tr.inactive[data-slug="'+e.slug+'"]')).siblings('[data-slug="'+e.slug+'"]');o.updates.isValidResponse(e,"delete")&&(o.updates.maybeHandleCredentialError(e,"delete-plugin")||(n.length?(n.find(".notice-error").remove(),n.find(".plugin-update").append(s)):t.addClass("update").after(a({slug:e.slug,plugin:e.plugin||e.slug,colspan:r("#bulk-action-form").find("thead th:not(.hidden), thead td").length,content:s})),p.trigger("wp-plugin-delete-error",e)))},o.updates.updateTheme=function(e){var t;return e=_.extend({success:o.updates.updateThemeSuccess,error:o.updates.updateThemeError},e),(t="themes-network"===pagenow?r('[data-slug="'+e.slug+'"]').find(".update-message").removeClass("notice-error").addClass("updating-message notice-warning").find("p"):"customize"===pagenow?((t=r('[data-slug="'+e.slug+'"].notice').removeClass("notice-large")).find("h3").remove(),(t=t.add(r("#customize-control-installed_theme_"+e.slug).find(".update-message"))).addClass("updating-message").find("p")):((t=r("#update-theme").closest(".notice").removeClass("notice-large")).find("h3").remove(),(t=t.add(r('[data-slug="'+e.slug+'"]').find(".update-message"))).addClass("updating-message").find("p"))).html()!==o.updates.l10n.updating&&t.data("originaltext",t.html()),o.a11y.speak(o.updates.l10n.updatingMsg,"polite"),t.text(o.updates.l10n.updating),p.trigger("wp-theme-updating",e),o.updates.ajax("update-theme",e)},o.updates.updateThemeSuccess=function(e){var t,a,s=r("body.modal-open").length,n=r('[data-slug="'+e.slug+'"]'),l={className:"updated-message notice-success notice-alt",message:o.updates.l10n.themeUpdated};"customize"===pagenow?((n=r(".updating-message").siblings(".theme-name")).length&&(a=n.html().replace(e.oldVersion,e.newVersion),n.html(a)),t=r(".theme-info .notice").add(o.customize.control("installed_theme_"+e.slug).container.find(".theme").find(".update-message"))):"themes-network"===pagenow?(t=n.find(".update-message"),a=n.find(".theme-version-author-uri").html().replace(e.oldVersion,e.newVersion),n.find(".theme-version-author-uri").html(a)):(t=r(".theme-info .notice").add(n.find(".update-message")),(s?r(".load-customize:visible"):n.find(".load-customize")).focus()),o.updates.addAdminNotice(_.extend({selector:t},l)),o.a11y.speak(o.updates.l10n.updatedMsg,"polite"),o.updates.decrementCount("theme"),p.trigger("wp-theme-update-success",e),s&&"customize"!==pagenow&&r(".theme-info .theme-author").after(o.updates.adminNotice(l))},o.updates.updateThemeError=function(e){var t,a=r('[data-slug="'+e.slug+'"]'),s=o.updates.l10n.updateFailed.replace("%s",e.errorMessage);o.updates.isValidResponse(e,"update")&&(o.updates.maybeHandleCredentialError(e,"update-theme")||("customize"===pagenow&&(a=o.customize.control("installed_theme_"+e.slug).container.find(".theme")),"themes-network"===pagenow?t=a.find(".update-message "):(t=r(".theme-info .notice").add(a.find(".notice")),(r("body.modal-open").length?r(".load-customize:visible"):a.find(".load-customize")).focus()),o.updates.addAdminNotice({selector:t,className:"update-message notice-error notice-alt is-dismissible",message:s}),o.a11y.speak(s,"polite"),p.trigger("wp-theme-update-error",e)))},o.updates.installTheme=function(e){var t=r('.theme-install[data-slug="'+e.slug+'"]');return e=_.extend({success:o.updates.installThemeSuccess,error:o.updates.installThemeError},e),t.addClass("updating-message"),t.parents(".theme").addClass("focus"),t.html()!==o.updates.l10n.installing&&t.data("originaltext",t.html()),t.text(o.updates.l10n.installing).attr("aria-label",o.updates.l10n.themeInstallingLabel.replace("%s",t.data("name"))),o.a11y.speak(o.updates.l10n.installingMsg,"polite"),r('.install-theme-info, [data-slug="'+e.slug+'"]').removeClass("theme-install-failed").find(".notice.notice-error").remove(),p.trigger("wp-theme-installing",e),o.updates.ajax("install-theme",e)},o.updates.installThemeSuccess=function(e){var t,a=r(".wp-full-overlay-header, [data-slug="+e.slug+"]");p.trigger("wp-theme-install-success",e),t=a.find(".button-primary").removeClass("updating-message").addClass("updated-message disabled").attr("aria-label",o.updates.l10n.themeInstalledLabel.replace("%s",e.themeName)).text(o.updates.l10n.themeInstalled),o.a11y.speak(o.updates.l10n.installedMsg,"polite"),setTimeout(function(){e.activateUrl&&t.attr("href",e.activateUrl).removeClass("theme-install updated-message disabled").addClass("activate").attr("aria-label",o.updates.l10n.activateThemeLabel.replace("%s",e.themeName)).text(o.updates.l10n.activateTheme),e.customizeUrl&&t.siblings(".preview").replaceWith(function(){return r("<a>").attr("href",e.customizeUrl).addClass("button load-customize").text(o.updates.l10n.livePreview)})},1e3)},o.updates.installThemeError=function(e){var t,a=o.updates.l10n.installFailed.replace("%s",e.errorMessage),s=o.updates.adminNotice({className:"update-message notice-error notice-alt",message:a});o.updates.isValidResponse(e,"install")&&(o.updates.maybeHandleCredentialError(e,"install-theme")||("customize"===pagenow?(p.find("body").hasClass("modal-open")?(t=r('.theme-install[data-slug="'+e.slug+'"]'),r(".theme-overlay .theme-info").prepend(s)):(t=r('.theme-install[data-slug="'+e.slug+'"]')).closest(".theme").addClass("theme-install-failed").append(s),o.customize.notifications.remove("theme_installing")):p.find("body").hasClass("full-overlay-active")?(t=r('.theme-install[data-slug="'+e.slug+'"]'),r(".install-theme-info").prepend(s)):t=r('[data-slug="'+e.slug+'"]').removeClass("focus").addClass("theme-install-failed").append(s).find(".theme-install"),t.removeClass("updating-message").attr("aria-label",o.updates.l10n.themeInstallFailedLabel.replace("%s",t.data("name"))).text(o.updates.l10n.installFailedShort),o.a11y.speak(a,"assertive"),p.trigger("wp-theme-install-error",e)))},o.updates.deleteTheme=function(e){var t;return"themes"===pagenow?t=r(".theme-actions .delete-theme"):"themes-network"===pagenow&&(t=r('[data-slug="'+e.slug+'"]').find(".row-actions a.delete")),e=_.extend({success:o.updates.deleteThemeSuccess,error:o.updates.deleteThemeError},e),t&&t.html()!==o.updates.l10n.deleting&&t.data("originaltext",t.html()).text(o.updates.l10n.deleting),o.a11y.speak(o.updates.l10n.deleting,"polite"),r(".theme-info .update-message").remove(),p.trigger("wp-theme-deleting",e),o.updates.ajax("delete-theme",e)},o.updates.deleteThemeSuccess=function(n){var e=r('[data-slug="'+n.slug+'"]');"themes-network"===pagenow&&e.css({backgroundColor:"#faafaa"}).fadeOut(350,function(){var e=r(".subsubsub"),t=r(this),a=d.themes,s=o.template("item-deleted-row");t.hasClass("plugin-update-tr")||t.after(s({slug:n.slug,colspan:r("#bulk-action-form").find("thead th:not(.hidden), thead td").length,name:t.find(".theme-title strong").text()})),t.remove(),t.hasClass("update")&&(a.upgrade--,o.updates.decrementCount("theme")),t.hasClass("inactive")&&(a.disabled--,a.disabled?e.find(".disabled .count").text("("+a.disabled+")"):e.find(".disabled").remove()),e.find(".all .count").text("("+--a.all+")")}),o.a11y.speak(o.updates.l10n.themeDeleted,"polite"),p.trigger("wp-theme-delete-success",n)},o.updates.deleteThemeError=function(e){var t=r('tr.inactive[data-slug="'+e.slug+'"]'),a=r(".theme-actions .delete-theme"),s=o.template("item-update-row"),n=t.siblings("#"+e.slug+"-update"),l=o.updates.l10n.deleteFailed.replace("%s",e.errorMessage),i=o.updates.adminNotice({className:"update-message notice-error notice-alt",message:l});o.updates.maybeHandleCredentialError(e,"delete-theme")||("themes-network"===pagenow?n.length?(n.find(".notice-error").remove(),n.find(".plugin-update").append(i)):t.addClass("update").after(s({slug:e.slug,colspan:r("#bulk-action-form").find("thead th:not(.hidden), thead td").length,content:i})):r(".theme-info .theme-description").before(i),a.html(a.data("originaltext")),o.a11y.speak(l,"assertive"),p.trigger("wp-theme-delete-error",e))},o.updates._addCallbacks=function(e,t){return"import"===pagenow&&"install-plugin"===t&&(e.success=o.updates.installImporterSuccess,e.error=o.updates.installImporterError),e},o.updates.queueChecker=function(){var e;if(!o.updates.ajaxLocked&&o.updates.queue.length)switch((e=o.updates.queue.shift()).action){case"install-plugin":o.updates.installPlugin(e.data);break;case"update-plugin":o.updates.updatePlugin(e.data);break;case"delete-plugin":o.updates.deletePlugin(e.data);break;case"install-theme":o.updates.installTheme(e.data);break;case"update-theme":o.updates.updateTheme(e.data);break;case"delete-theme":o.updates.deleteTheme(e.data)}},o.updates.requestFilesystemCredentials=function(e){!1===o.updates.filesystemCredentials.available&&(e&&!o.updates.$elToReturnFocusToFromCredentialsModal&&(o.updates.$elToReturnFocusToFromCredentialsModal=r(e.target)),o.updates.ajaxLocked=!0,o.updates.requestForCredentialsModalOpen())},o.updates.maybeRequestFilesystemCredentials=function(e){o.updates.shouldRequestFilesystemCredentials&&!o.updates.ajaxLocked&&o.updates.requestFilesystemCredentials(e)},o.updates.keydown=function(e){27===e.keyCode?o.updates.requestForCredentialsModalCancel():9===e.keyCode&&("upgrade"!==e.target.id||e.shiftKey?"hostname"===e.target.id&&e.shiftKey&&(r("#upgrade").focus(),e.preventDefault()):(r("#hostname").focus(),e.preventDefault()))},o.updates.requestForCredentialsModalOpen=function(){var e=r("#request-filesystem-credentials-dialog");r("body").addClass("modal-open"),e.show(),e.find("input:enabled:first").focus(),e.on("keydown",o.updates.keydown)},o.updates.requestForCredentialsModalClose=function(){r("#request-filesystem-credentials-dialog").hide(),r("body").removeClass("modal-open"),o.updates.$elToReturnFocusToFromCredentialsModal&&o.updates.$elToReturnFocusToFromCredentialsModal.focus()},o.updates.requestForCredentialsModalCancel=function(){(o.updates.ajaxLocked||o.updates.queue.length)&&(_.each(o.updates.queue,function(e){p.trigger("credential-modal-cancel",e)}),o.updates.ajaxLocked=!1,o.updates.queue=[],o.updates.requestForCredentialsModalClose())},o.updates.showErrorInCredentialsForm=function(e){var t=r("#request-filesystem-credentials-form");t.find(".notice").remove(),t.find("#request-filesystem-credentials-title").after('<div class="notice notice-alt notice-error"><p>'+e+"</p></div>")},o.updates.credentialError=function(e,t){e=o.updates._addCallbacks(e,t),o.updates.queue.unshift({action:t,data:e}),o.updates.filesystemCredentials.available=!1,o.updates.showErrorInCredentialsForm(e.errorMessage),o.updates.requestFilesystemCredentials()},o.updates.maybeHandleCredentialError=function(e,t){return!(!o.updates.shouldRequestFilesystemCredentials||!e.errorCode||"unable_to_connect_to_filesystem"!==e.errorCode)&&(o.updates.credentialError(e,t),!0)},o.updates.isValidResponse=function(e,t){var a,s=o.updates.l10n.unknownError;if(_.isObject(e)&&!_.isFunction(e.always))return!0;switch(_.isString(e)&&"-1"===e?s=o.updates.l10n.nonceError:_.isString(e)?s=e:void 0!==e.readyState&&0===e.readyState?s=o.updates.l10n.connectionError:_.isString(e.responseText)&&""!==e.responseText?s=e.responseText:_.isString(e.statusText)&&(s=e.statusText),t){case"update":a=o.updates.l10n.updateFailed;break;case"install":a=o.updates.l10n.installFailed;break;case"delete":a=o.updates.l10n.deleteFailed}return s=s.replace(/<[\/a-z][^<>]*>/gi,""),a=a.replace("%s",s),o.updates.addAdminNotice({id:"unknown_error",className:"notice-error is-dismissible",message:_.escape(a)}),o.updates.ajaxLocked=!1,o.updates.queue=[],r(".button.updating-message").removeClass("updating-message").removeAttr("aria-label").prop("disabled",!0).text(o.updates.l10n.updateFailedShort),r(".updating-message:not(.button):not(.thickbox)").removeClass("updating-message notice-warning").addClass("notice-error").find("p").removeAttr("aria-label").text(a),o.a11y.speak(a,"assertive"),!1},o.updates.beforeunload=function(){if(o.updates.ajaxLocked)return o.updates.l10n.beforeunload},r(function(){var l=r("#plugin-filter"),u=r("#bulk-action-form"),e=r("#request-filesystem-credentials-form"),t=r("#request-filesystem-credentials-dialog"),a=r(".plugins-php .wp-filter-search"),s=r(".plugin-install-php .wp-filter-search");(d=_.extend(d,window._wpUpdatesItemCounts||{})).totals&&o.updates.refreshCount(),o.updates.shouldRequestFilesystemCredentials=0<t.length,t.on("submit","form",function(e){e.preventDefault(),o.updates.filesystemCredentials.ftp.hostname=r("#hostname").val(),o.updates.filesystemCredentials.ftp.username=r("#username").val(),o.updates.filesystemCredentials.ftp.password=r("#password").val(),o.updates.filesystemCredentials.ftp.connectionType=r('input[name="connection_type"]:checked').val(),o.updates.filesystemCredentials.ssh.publicKey=r("#public_key").val(),o.updates.filesystemCredentials.ssh.privateKey=r("#private_key").val(),o.updates.filesystemCredentials.fsNonce=r("#_fs_nonce").val(),o.updates.filesystemCredentials.available=!0,o.updates.ajaxLocked=!1,o.updates.queueChecker(),o.updates.requestForCredentialsModalClose()}),t.on("click",'[data-js-action="close"], .notification-dialog-background',o.updates.requestForCredentialsModalCancel),e.on("change",'input[name="connection_type"]',function(){r("#ssh-keys").toggleClass("hidden","ssh"!==r(this).val())}).change(),p.on("credential-modal-cancel",function(e,t){var a,s=r(".updating-message");"import"===pagenow?s.removeClass("updating-message"):"plugins"===pagenow||"plugins-network"===pagenow?"update-plugin"===t.action?a=r('tr[data-plugin="'+t.data.plugin+'"]').find(".update-message"):"delete-plugin"===t.action&&(a=r('[data-plugin="'+t.data.plugin+'"]').find(".row-actions a.delete")):"themes"===pagenow||"themes-network"===pagenow?"update-theme"===t.action?a=r('[data-slug="'+t.data.slug+'"]').find(".update-message"):"delete-theme"===t.action&&"themes-network"===pagenow?a=r('[data-slug="'+t.data.slug+'"]').find(".row-actions a.delete"):"delete-theme"===t.action&&"themes"===pagenow&&(a=r(".theme-actions .delete-theme")):a=s,a&&a.hasClass("updating-message")&&(void 0===(s=a.data("originaltext"))&&(s=r("<p>").html(a.find("p").data("originaltext"))),a.removeClass("updating-message").html(s),"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||("update-plugin"===t.action?a.attr("aria-label",o.updates.l10n.pluginUpdateNowLabel.replace("%s",a.data("name"))):"install-plugin"===t.action&&a.attr("aria-label",o.updates.l10n.pluginInstallNowLabel.replace("%s",a.data("name"))))),o.a11y.speak(o.updates.l10n.updateCancel,"polite")}),u.on("click","[data-plugin] .update-link",function(e){var t=r(e.target),a=t.parents("tr");e.preventDefault(),t.hasClass("updating-message")||t.hasClass("button-disabled")||(o.updates.maybeRequestFilesystemCredentials(e),o.updates.$elToReturnFocusToFromCredentialsModal=a.find(".check-column input"),o.updates.updatePlugin({plugin:a.data("plugin"),slug:a.data("slug")}))}),l.on("click",".update-now",function(e){var t=r(e.target);e.preventDefault(),t.hasClass("updating-message")||t.hasClass("button-disabled")||(o.updates.maybeRequestFilesystemCredentials(e),o.updates.updatePlugin({plugin:t.data("plugin"),slug:t.data("slug")}))}),l.on("click",".install-now",function(e){var t=r(e.target);e.preventDefault(),t.hasClass("updating-message")||t.hasClass("button-disabled")||(o.updates.shouldRequestFilesystemCredentials&&!o.updates.ajaxLocked&&(o.updates.requestFilesystemCredentials(e),p.on("credential-modal-cancel",function(){r(".install-now.updating-message").removeClass("updating-message").text(o.updates.l10n.installNow),o.a11y.speak(o.updates.l10n.updateCancel,"polite")})),o.updates.installPlugin({slug:t.data("slug")}))}),p.on("click",".importer-item .install-now",function(e){var t=r(e.target),a=r(this).data("name");e.preventDefault(),t.hasClass("updating-message")||(o.updates.shouldRequestFilesystemCredentials&&!o.updates.ajaxLocked&&(o.updates.requestFilesystemCredentials(e),p.on("credential-modal-cancel",function(){t.removeClass("updating-message").text(o.updates.l10n.installNow).attr("aria-label",o.updates.l10n.installNowLabel.replace("%s",a)),o.a11y.speak(o.updates.l10n.updateCancel,"polite")})),o.updates.installPlugin({slug:t.data("slug"),pagenow:pagenow,success:o.updates.installImporterSuccess,error:o.updates.installImporterError}))}),u.on("click","[data-plugin] a.delete",function(e){var t=r(e.target).parents("tr");e.preventDefault(),window.confirm(o.updates.l10n.aysDeleteUninstall.replace("%s",t.find(".plugin-title strong").text()))&&(o.updates.maybeRequestFilesystemCredentials(e),o.updates.deletePlugin({plugin:t.data("plugin"),slug:t.data("slug")}))}),p.on("click",".themes-php.network-admin .update-link",function(e){var t=r(e.target),a=t.parents("tr");e.preventDefault(),t.hasClass("updating-message")||t.hasClass("button-disabled")||(o.updates.maybeRequestFilesystemCredentials(e),o.updates.$elToReturnFocusToFromCredentialsModal=a.find(".check-column input"),o.updates.updateTheme({slug:a.data("slug")}))}),p.on("click",".themes-php.network-admin a.delete",function(e){var t=r(e.target).parents("tr");e.preventDefault(),window.confirm(o.updates.l10n.aysDelete.replace("%s",t.find(".theme-title strong").text()))&&(o.updates.maybeRequestFilesystemCredentials(e),o.updates.deleteTheme({slug:t.data("slug")}))}),u.on("click",'[type="submit"]:not([name="clear-recent-list"])',function(e){var t,s,n=r(e.target).siblings("select").val(),a=u.find('input[name="checked[]"]:checked'),l=0,i=0,d=[];switch(pagenow){case"plugins":case"plugins-network":t="plugin";break;case"themes-network":t="theme";break;default:return}if(!a.length)return e.preventDefault(),r("html, body").animate({scrollTop:0}),o.updates.addAdminNotice({id:"no-items-selected",className:"notice-error is-dismissible",message:o.updates.l10n.noItemsSelected});switch(n){case"update-selected":s=n.replace("selected",t);break;case"delete-selected":if(!window.confirm("plugin"===t?o.updates.l10n.aysBulkDelete:o.updates.l10n.aysBulkDeleteThemes))return void e.preventDefault();s=n.replace("selected",t);break;default:return}o.updates.maybeRequestFilesystemCredentials(e),e.preventDefault(),u.find('.manage-column [type="checkbox"]').prop("checked",!1),p.trigger("wp-"+t+"-bulk-"+n,a),a.each(function(e,t){var a=r(t),t=a.parents("tr");"update-selected"!==n||t.hasClass("update")&&!t.find("notice-error").length?o.updates.queue.push({action:s,data:{plugin:t.data("plugin"),slug:t.data("slug")}}):a.prop("checked",!1)}),p.on("wp-plugin-update-success wp-plugin-update-error wp-theme-update-success wp-theme-update-error",function(e,t){var a,s=r('[data-slug="'+t.slug+'"]');"wp-"+t.update+"-update-success"===e.type?l++:(e=t.pluginName||s.find(".column-primary strong").text(),i++,d.push(e+": "+t.errorMessage)),s.find('input[name="checked[]"]:checked').prop("checked",!1),o.updates.adminNotice=o.template("wp-bulk-updates-admin-notice"),o.updates.addAdminNotice({id:"bulk-action-notice",className:"bulk-action-notice",successes:l,errors:i,errorMessages:d,type:t.update}),a=r("#bulk-action-notice").on("click","button",function(){r(this).toggleClass("bulk-action-errors-collapsed").attr("aria-expanded",!r(this).hasClass("bulk-action-errors-collapsed")),a.find(".bulk-action-errors").toggleClass("hidden")}),0<i&&!o.updates.queue.length&&r("html, body").animate({scrollTop:0})}),p.on("wp-updates-notice-added",function(){o.updates.adminNotice=o.template("wp-updates-admin-notice")}),o.updates.queueChecker()}),s.length&&s.attr("aria-describedby","live-search-desc"),s.on("keyup input",_.debounce(function(e,t){var a=r(".plugin-install-search"),s={_ajax_nonce:o.updates.ajaxNonce,s:e.target.value,tab:"search",type:r("#typeselector").val(),pagenow:pagenow},n=location.href.split("?")[0]+"?"+r.param(_.omit(s,["_ajax_nonce","pagenow"]));"keyup"===e.type&&27===e.which&&(e.target.value=""),o.updates.searchTerm===s.s&&"typechange"!==t||(l.empty(),o.updates.searchTerm=s.s,window.history&&window.history.replaceState&&window.history.replaceState(null,"",n),a.length||(a=r('<li class="plugin-install-search" />').append(r("<a />",{class:"current",href:n,text:o.updates.l10n.searchResultsLabel})),r(".wp-filter .filter-links .current").removeClass("current").parents(".filter-links").prepend(a),l.prev("p").remove(),r(".plugins-popular-tags-wrapper").remove()),void 0!==o.updates.searchRequest&&o.updates.searchRequest.abort(),r("body").addClass("loading-content"),o.updates.searchRequest=o.ajax.post("search-install-plugins",s).done(function(e){r("body").removeClass("loading-content"),l.append(e.items),delete o.updates.searchRequest,0===e.count?o.a11y.speak(o.updates.l10n.noPluginsFound):o.a11y.speak(o.updates.l10n.pluginsFound.replace("%d",e.count))}))},500)),a.length&&a.attr("aria-describedby","live-search-desc"),a.on("keyup input",_.debounce(function(e){var s={_ajax_nonce:o.updates.ajaxNonce,s:e.target.value,pagenow:pagenow,plugin_status:"all"};"keyup"===e.type&&27===e.which&&(e.target.value=""),o.updates.searchTerm!==s.s&&(o.updates.searchTerm=s.s,e=_.object(_.compact(_.map(location.search.slice(1).split("&"),function(e){if(e)return e.split("=")}))),s.plugin_status=e.plugin_status||"all",window.history&&window.history.replaceState&&window.history.replaceState(null,"",location.href.split("?")[0]+"?s="+s.s+"&plugin_status="+s.plugin_status),void 0!==o.updates.searchRequest&&o.updates.searchRequest.abort(),u.empty(),r("body").addClass("loading-content"),r(".subsubsub .current").removeClass("current"),o.updates.searchRequest=o.ajax.post("search-plugins",s).done(function(e){var t=r("<span />").addClass("subtitle").html(o.updates.l10n.searchResults.replace("%s",_.escape(s.s))),a=r(".wrap .subtitle");s.s.length?a.length?a.replaceWith(t):r(".wp-header-end").before(t):(a.remove(),r(".subsubsub ."+s.plugin_status+" a").addClass("current")),r("body").removeClass("loading-content"),u.append(e.items),delete o.updates.searchRequest,0===e.count?o.a11y.speak(o.updates.l10n.noPluginsFound):o.a11y.speak(o.updates.l10n.pluginsFound.replace("%d",e.count))}))},500)),p.on("submit",".search-plugins",function(e){e.preventDefault(),r("input.wp-filter-search").trigger("input")}),p.on("click",".try-again",function(e){e.preventDefault(),s.trigger("input")}),r("#typeselector").on("change",function(){var e=r('input[name="s"]');e.val().length&&e.trigger("input","typechange")}),r("#plugin_update_from_iframe").on("click",function(e){var t=window.parent===window?null:window.parent;r.support.postMessage=!!window.postMessage,!1!==r.support.postMessage&&null!==t&&-1===window.parent.location.pathname.indexOf("update-core.php")&&(e.preventDefault(),e={action:"update-plugin",data:{plugin:r(this).data("plugin"),slug:r(this).data("slug")}},t.postMessage(JSON.stringify(e),window.location.origin))}),r("#plugin_install_from_iframe").on("click",function(e){var t=window.parent===window?null:window.parent;r.support.postMessage=!!window.postMessage,!1!==r.support.postMessage&&null!==t&&-1===window.parent.location.pathname.indexOf("index.php")&&(e.preventDefault(),e={action:"install-plugin",data:{slug:r(this).data("slug")}},t.postMessage(JSON.stringify(e),window.location.origin))}),r(window).on("message",function(e){var t,a=e.originalEvent,e=document.location.protocol+"//"+document.location.hostname;if(a.origin===e){try{t=r.parseJSON(a.data)}catch(e){return}if(t&&void 0!==t.action)switch(t.action){case"decrementUpdateCount":o.updates.decrementCount(t.upgradeType);break;case"install-plugin":case"update-plugin":window.tb_remove(),t.data=o.updates._addCallbacks(t.data,t.action),o.updates.queue.push(t),o.updates.queueChecker()}}}),r(window).on("beforeunload",o.updates.beforeunload)})}(jQuery,window.wp,window._wpUpdatesSettings);home/xbodynamge/dev/wp-admin/js/updates.min.js000060400000106051151117362600015325 0ustar00!function(a,b,c){var d=a(document);b=b||{},b.updates={},b.updates.ajaxNonce=c.ajax_nonce,b.updates.l10n=c.l10n,b.updates.searchTerm="",b.updates.shouldRequestFilesystemCredentials=!1,b.updates.filesystemCredentials={ftp:{host:"",username:"",password:"",connectionType:""},ssh:{publicKey:"",privateKey:""},fsNonce:"",available:!1},b.updates.ajaxLocked=!1,b.updates.adminNotice=b.template("wp-updates-admin-notice"),b.updates.queue=[],b.updates.$elToReturnFocusToFromCredentialsModal=void 0,b.updates.addAdminNotice=function(c){var e,f=a(c.selector);delete c.selector,e=b.updates.adminNotice(c),f.length||(f=a("#"+c.id)),f.length?f.replaceWith(e):"customize"===pagenow?a(".customize-themes-notifications").append(e):a(".wrap").find("> h1").after(e),d.trigger("wp-updates-notice-added")},b.updates.ajax=function(c,d){var e={};return b.updates.ajaxLocked?(b.updates.queue.push({action:c,data:d}),a.Deferred()):(b.updates.ajaxLocked=!0,d.success&&(e.success=d.success,delete d.success),d.error&&(e.error=d.error,delete d.error),e.data=_.extend(d,{action:c,_ajax_nonce:b.updates.ajaxNonce,_fs_nonce:b.updates.filesystemCredentials.fsNonce,username:b.updates.filesystemCredentials.ftp.username,password:b.updates.filesystemCredentials.ftp.password,hostname:b.updates.filesystemCredentials.ftp.hostname,connection_type:b.updates.filesystemCredentials.ftp.connectionType,public_key:b.updates.filesystemCredentials.ssh.publicKey,private_key:b.updates.filesystemCredentials.ssh.privateKey}),b.ajax.send(e).always(b.updates.ajaxAlways))},b.updates.ajaxAlways=function(c){c.errorCode&&"unable_to_connect_to_filesystem"===c.errorCode||(b.updates.ajaxLocked=!1,b.updates.queueChecker()),"undefined"!=typeof c.debug&&window.console&&window.console.log&&_.map(c.debug,function(b){window.console.log(a("<p />").html(b).text())})},b.updates.refreshCount=function(){var b,d=a("#wp-admin-bar-updates"),e=a('a[href="update-core.php"] .update-plugins'),f=a('a[href="plugins.php"] .update-plugins'),g=a('a[href="themes.php"] .update-plugins');d.find(".ab-item").removeAttr("title"),d.find(".ab-label").text(c.totals.counts.total),0===c.totals.counts.total&&d.find(".ab-label").parents("li").remove(),e.each(function(a,b){b.className=b.className.replace(/count-\d+/,"count-"+c.totals.counts.total)}),c.totals.counts.total>0?e.find(".update-count").text(c.totals.counts.total):e.remove(),f.each(function(a,b){b.className=b.className.replace(/count-\d+/,"count-"+c.totals.counts.plugins)}),c.totals.counts.total>0?f.find(".plugin-count").text(c.totals.counts.plugins):f.remove(),g.each(function(a,b){b.className=b.className.replace(/count-\d+/,"count-"+c.totals.counts.themes)}),c.totals.counts.total>0?g.find(".theme-count").text(c.totals.counts.themes):g.remove(),"plugins"===pagenow||"plugins-network"===pagenow?b=c.totals.counts.plugins:"themes"!==pagenow&&"themes-network"!==pagenow||(b=c.totals.counts.themes),b>0?a(".subsubsub .upgrade .count").text("("+b+")"):(a(".subsubsub .upgrade").remove(),a(".subsubsub li:last").html(function(){return a(this).children()}))},b.updates.decrementCount=function(a){c.totals.counts.total=Math.max(--c.totals.counts.total,0),"plugin"===a?c.totals.counts.plugins=Math.max(--c.totals.counts.plugins,0):"theme"===a&&(c.totals.counts.themes=Math.max(--c.totals.counts.themes,0)),b.updates.refreshCount(a)},b.updates.updatePlugin=function(c){var e,f,g,h;return c=_.extend({success:b.updates.updatePluginSuccess,error:b.updates.updatePluginError},c),"plugins"===pagenow||"plugins-network"===pagenow?(e=a('tr[data-plugin="'+c.plugin+'"]'),g=e.find(".update-message").removeClass("notice-error").addClass("updating-message notice-warning").find("p"),h=b.updates.l10n.pluginUpdatingLabel.replace("%s",e.find(".plugin-title strong").text())):"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||(f=a(".plugin-card-"+c.slug),g=f.find(".update-now").addClass("updating-message"),h=b.updates.l10n.pluginUpdatingLabel.replace("%s",g.data("name")),f.removeClass("plugin-card-update-failed").find(".notice.notice-error").remove()),g.html()!==b.updates.l10n.updating&&g.data("originaltext",g.html()),g.attr("aria-label",h).text(b.updates.l10n.updating),d.trigger("wp-plugin-updating",c),b.updates.ajax("update-plugin",c)},b.updates.updatePluginSuccess=function(c){var e,f,g;"plugins"===pagenow||"plugins-network"===pagenow?(e=a('tr[data-plugin="'+c.plugin+'"]').removeClass("update").addClass("updated"),f=e.find(".update-message").removeClass("updating-message notice-warning").addClass("updated-message notice-success").find("p"),g=e.find(".plugin-version-author-uri").html().replace(c.oldVersion,c.newVersion),e.find(".plugin-version-author-uri").html(g)):"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||(f=a(".plugin-card-"+c.slug).find(".update-now").removeClass("updating-message").addClass("button-disabled updated-message")),f.attr("aria-label",b.updates.l10n.pluginUpdatedLabel.replace("%s",c.pluginName)).text(b.updates.l10n.pluginUpdated),b.a11y.speak(b.updates.l10n.updatedMsg,"polite"),b.updates.decrementCount("plugin"),d.trigger("wp-plugin-update-success",c)},b.updates.updatePluginError=function(c){var e,f,g;b.updates.isValidResponse(c,"update")&&(b.updates.maybeHandleCredentialError(c,"update-plugin")||(g=b.updates.l10n.updateFailed.replace("%s",c.errorMessage),"plugins"===pagenow||"plugins-network"===pagenow?(f=c.plugin?a('tr[data-plugin="'+c.plugin+'"]').find(".update-message"):a('tr[data-slug="'+c.slug+'"]').find(".update-message"),f.removeClass("updating-message notice-warning").addClass("notice-error").find("p").html(g),c.pluginName?f.find("p").attr("aria-label",b.updates.l10n.pluginUpdateFailedLabel.replace("%s",c.pluginName)):f.find("p").removeAttr("aria-label")):"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||(e=a(".plugin-card-"+c.slug).addClass("plugin-card-update-failed").append(b.updates.adminNotice({className:"update-message notice-error notice-alt is-dismissible",message:g})),e.find(".update-now").text(b.updates.l10n.updateFailedShort).removeClass("updating-message"),c.pluginName?e.find(".update-now").attr("aria-label",b.updates.l10n.pluginUpdateFailedLabel.replace("%s",c.pluginName)):e.find(".update-now").removeAttr("aria-label"),e.on("click",".notice.is-dismissible .notice-dismiss",function(){setTimeout(function(){e.removeClass("plugin-card-update-failed").find(".column-name a").focus(),e.find(".update-now").attr("aria-label",!1).text(b.updates.l10n.updateNow)},200)})),b.a11y.speak(g,"assertive"),d.trigger("wp-plugin-update-error",c)))},b.updates.installPlugin=function(c){var e=a(".plugin-card-"+c.slug),f=e.find(".install-now");return c=_.extend({success:b.updates.installPluginSuccess,error:b.updates.installPluginError},c),"import"===pagenow&&(f=a('[data-slug="'+c.slug+'"]')),f.html()!==b.updates.l10n.installing&&f.data("originaltext",f.html()),f.addClass("updating-message").attr("aria-label",b.updates.l10n.pluginInstallingLabel.replace("%s",f.data("name"))).text(b.updates.l10n.installing),b.a11y.speak(b.updates.l10n.installingMsg,"polite"),e.removeClass("plugin-card-install-failed").find(".notice.notice-error").remove(),d.trigger("wp-plugin-installing",c),b.updates.ajax("install-plugin",c)},b.updates.installPluginSuccess=function(c){var e=a(".plugin-card-"+c.slug).find(".install-now");e.removeClass("updating-message").addClass("updated-message installed").attr("aria-label",b.updates.l10n.pluginInstalledLabel.replace("%s",c.pluginName)).text(b.updates.l10n.pluginInstalled),e.hasClass("button-primary")?e.addClass("button-primary-disabled"):e.addClass("button-disabled"),b.a11y.speak(b.updates.l10n.installedMsg,"polite"),d.trigger("wp-plugin-install-success",c),c.activateUrl&&setTimeout(function(){e.removeClass("install-now installed button-primary-disabled button-secondary-disabled button-disabled updated-message").addClass("activate-now").attr("href",c.activateUrl).attr("aria-label",b.updates.l10n.activatePluginLabel.replace("%s",c.pluginName)).text(c.activateLabel||b.updates.l10n.activatePlugin)},1e3)},b.updates.installPluginError=function(c){var e,f=a(".plugin-card-"+c.slug),g=f.find(".install-now");b.updates.isValidResponse(c,"install")&&(b.updates.maybeHandleCredentialError(c,"install-plugin")||(e=b.updates.l10n.installFailed.replace("%s",c.errorMessage),f.addClass("plugin-card-update-failed").append('<div class="notice notice-error notice-alt is-dismissible"><p>'+e+"</p></div>"),f.on("click",".notice.is-dismissible .notice-dismiss",function(){setTimeout(function(){f.removeClass("plugin-card-update-failed").find(".column-name a").focus()},200)}),g.removeClass("updating-message").addClass("button-disabled").attr("aria-label",b.updates.l10n.pluginInstallFailedLabel.replace("%s",g.data("name"))).text(b.updates.l10n.installFailedShort),b.a11y.speak(e,"assertive"),d.trigger("wp-plugin-install-error",c)))},b.updates.installImporterSuccess=function(c){b.updates.addAdminNotice({id:"install-success",className:"notice-success is-dismissible",message:b.updates.l10n.importerInstalledMsg.replace("%s",c.activateUrl+"&from=import")}),a('[data-slug="'+c.slug+'"]').removeClass("install-now updating-message").addClass("activate-now").attr({href:c.activateUrl+"&from=import","aria-label":b.updates.l10n.activateImporterLabel.replace("%s",c.pluginName)}).text(b.updates.l10n.activateImporter),b.a11y.speak(b.updates.l10n.installedMsg,"polite"),d.trigger("wp-importer-install-success",c)},b.updates.installImporterError=function(c){var e=b.updates.l10n.installFailed.replace("%s",c.errorMessage),f=a('[data-slug="'+c.slug+'"]'),g=f.data("name");b.updates.isValidResponse(c,"install")&&(b.updates.maybeHandleCredentialError(c,"install-plugin")||(b.updates.addAdminNotice({id:c.errorCode,className:"notice-error is-dismissible",message:e}),f.removeClass("updating-message").text(b.updates.l10n.installNow).attr("aria-label",b.updates.l10n.installNowLabel.replace("%s",g)),b.a11y.speak(e,"assertive"),d.trigger("wp-importer-install-error",c)))},b.updates.deletePlugin=function(c){var e=a('[data-plugin="'+c.plugin+'"]').find(".row-actions a.delete");return c=_.extend({success:b.updates.deletePluginSuccess,error:b.updates.deletePluginError},c),e.html()!==b.updates.l10n.deleting&&e.data("originaltext",e.html()).text(b.updates.l10n.deleting),b.a11y.speak(b.updates.l10n.deleting,"polite"),d.trigger("wp-plugin-deleting",c),b.updates.ajax("delete-plugin",c)},b.updates.deletePluginSuccess=function(e){a('[data-plugin="'+e.plugin+'"]').css({backgroundColor:"#faafaa"}).fadeOut(350,function(){var d=a("#bulk-action-form"),f=a(".subsubsub"),g=a(this),h=d.find("thead th:not(.hidden), thead td").length,i=b.template("item-deleted-row"),j=c.plugins;g.hasClass("plugin-update-tr")||g.after(i({slug:e.slug,plugin:e.plugin,colspan:h,name:e.pluginName})),g.remove(),-1!==_.indexOf(j.upgrade,e.plugin)&&(j.upgrade=_.without(j.upgrade,e.plugin),b.updates.decrementCount("plugin")),-1!==_.indexOf(j.inactive,e.plugin)&&(j.inactive=_.without(j.inactive,e.plugin),j.inactive.length?f.find(".inactive .count").text("("+j.inactive.length+")"):f.find(".inactive").remove()),-1!==_.indexOf(j.active,e.plugin)&&(j.active=_.without(j.active,e.plugin),j.active.length?f.find(".active .count").text("("+j.active.length+")"):f.find(".active").remove()),-1!==_.indexOf(j.recently_activated,e.plugin)&&(j.recently_activated=_.without(j.recently_activated,e.plugin),j.recently_activated.length?f.find(".recently_activated .count").text("("+j.recently_activated.length+")"):f.find(".recently_activated").remove()),j.all=_.without(j.all,e.plugin),j.all.length?f.find(".all .count").text("("+j.all.length+")"):(d.find(".tablenav").css({visibility:"hidden"}),f.find(".all").remove(),d.find("tr.no-items").length||d.find("#the-list").append('<tr class="no-items"><td class="colspanchange" colspan="'+h+'">'+b.updates.l10n.noPlugins+"</td></tr>"))}),b.a11y.speak(b.updates.l10n.pluginDeleted,"polite"),d.trigger("wp-plugin-delete-success",e)},b.updates.deletePluginError=function(c){var e,f,g=b.template("item-update-row"),h=b.updates.adminNotice({className:"update-message notice-error notice-alt",message:c.errorMessage});c.plugin?(e=a('tr.inactive[data-plugin="'+c.plugin+'"]'),f=e.siblings('[data-plugin="'+c.plugin+'"]')):(e=a('tr.inactive[data-slug="'+c.slug+'"]'),f=e.siblings('[data-slug="'+c.slug+'"]')),b.updates.isValidResponse(c,"delete")&&(b.updates.maybeHandleCredentialError(c,"delete-plugin")||(f.length?(f.find(".notice-error").remove(),f.find(".plugin-update").append(h)):e.addClass("update").after(g({slug:c.slug,plugin:c.plugin||c.slug,colspan:a("#bulk-action-form").find("thead th:not(.hidden), thead td").length,content:h})),d.trigger("wp-plugin-delete-error",c)))},b.updates.updateTheme=function(c){var e;return c=_.extend({success:b.updates.updateThemeSuccess,error:b.updates.updateThemeError},c),"themes-network"===pagenow?e=a('[data-slug="'+c.slug+'"]').find(".update-message").removeClass("notice-error").addClass("updating-message notice-warning").find("p"):"customize"===pagenow?(e=a('[data-slug="'+c.slug+'"].notice').removeClass("notice-large"),e.find("h3").remove(),e=e.add(a("#customize-control-installed_theme_"+c.slug).find(".update-message")),e=e.addClass("updating-message").find("p")):(e=a("#update-theme").closest(".notice").removeClass("notice-large"),e.find("h3").remove(),e=e.add(a('[data-slug="'+c.slug+'"]').find(".update-message")),e=e.addClass("updating-message").find("p")),e.html()!==b.updates.l10n.updating&&e.data("originaltext",e.html()),b.a11y.speak(b.updates.l10n.updatingMsg,"polite"),e.text(b.updates.l10n.updating),d.trigger("wp-theme-updating",c),b.updates.ajax("update-theme",c)},b.updates.updateThemeSuccess=function(c){var e,f,g=a("body.modal-open").length,h=a('[data-slug="'+c.slug+'"]'),i={className:"updated-message notice-success notice-alt",message:b.updates.l10n.themeUpdated};"customize"===pagenow?(h=a(".updating-message").siblings(".theme-name"),h.length&&(f=h.html().replace(c.oldVersion,c.newVersion),h.html(f)),e=a(".theme-info .notice").add(b.customize.control("installed_theme_"+c.slug).container.find(".theme").find(".update-message"))):"themes-network"===pagenow?(e=h.find(".update-message"),f=h.find(".theme-version-author-uri").html().replace(c.oldVersion,c.newVersion),h.find(".theme-version-author-uri").html(f)):(e=a(".theme-info .notice").add(h.find(".update-message")),g?a(".load-customize:visible").focus():h.find(".load-customize").focus()),b.updates.addAdminNotice(_.extend({selector:e},i)),b.a11y.speak(b.updates.l10n.updatedMsg,"polite"),b.updates.decrementCount("theme"),d.trigger("wp-theme-update-success",c),g&&"customize"!==pagenow&&a(".theme-info .theme-author").after(b.updates.adminNotice(i))},b.updates.updateThemeError=function(c){var e,f=a('[data-slug="'+c.slug+'"]'),g=b.updates.l10n.updateFailed.replace("%s",c.errorMessage);b.updates.isValidResponse(c,"update")&&(b.updates.maybeHandleCredentialError(c,"update-theme")||("customize"===pagenow&&(f=b.customize.control("installed_theme_"+c.slug).container.find(".theme")),"themes-network"===pagenow?e=f.find(".update-message "):(e=a(".theme-info .notice").add(f.find(".notice")),a("body.modal-open").length?a(".load-customize:visible").focus():f.find(".load-customize").focus()),b.updates.addAdminNotice({selector:e,className:"update-message notice-error notice-alt is-dismissible",message:g}),b.a11y.speak(g,"polite"),d.trigger("wp-theme-update-error",c)))},b.updates.installTheme=function(c){var e=a('.theme-install[data-slug="'+c.slug+'"]');return c=_.extend({success:b.updates.installThemeSuccess,error:b.updates.installThemeError},c),e.addClass("updating-message"),e.parents(".theme").addClass("focus"),e.html()!==b.updates.l10n.installing&&e.data("originaltext",e.html()),e.text(b.updates.l10n.installing).attr("aria-label",b.updates.l10n.themeInstallingLabel.replace("%s",e.data("name"))),b.a11y.speak(b.updates.l10n.installingMsg,"polite"),a('.install-theme-info, [data-slug="'+c.slug+'"]').removeClass("theme-install-failed").find(".notice.notice-error").remove(),d.trigger("wp-theme-installing",c),b.updates.ajax("install-theme",c)},b.updates.installThemeSuccess=function(c){var e,f=a(".wp-full-overlay-header, [data-slug="+c.slug+"]");d.trigger("wp-theme-install-success",c),e=f.find(".button-primary").removeClass("updating-message").addClass("updated-message disabled").attr("aria-label",b.updates.l10n.themeInstalledLabel.replace("%s",c.themeName)).text(b.updates.l10n.themeInstalled),b.a11y.speak(b.updates.l10n.installedMsg,"polite"),setTimeout(function(){c.activateUrl&&e.attr("href",c.activateUrl).removeClass("theme-install updated-message disabled").addClass("activate").attr("aria-label",b.updates.l10n.activateThemeLabel.replace("%s",c.themeName)).text(b.updates.l10n.activateTheme),c.customizeUrl&&e.siblings(".preview").replaceWith(function(){return a("<a>").attr("href",c.customizeUrl).addClass("button load-customize").text(b.updates.l10n.livePreview)})},1e3)},b.updates.installThemeError=function(c){var e,f,g=b.updates.l10n.installFailed.replace("%s",c.errorMessage),h=b.updates.adminNotice({className:"update-message notice-error notice-alt",message:g});b.updates.isValidResponse(c,"install")&&(b.updates.maybeHandleCredentialError(c,"install-theme")||("customize"===pagenow?(d.find("body").hasClass("modal-open")?(f=a('.theme-install[data-slug="'+c.slug+'"]'),e=a(".theme-overlay .theme-info").prepend(h)):(f=a('.theme-install[data-slug="'+c.slug+'"]'),e=f.closest(".theme").addClass("theme-install-failed").append(h)),b.customize.notifications.remove("theme_installing")):d.find("body").hasClass("full-overlay-active")?(f=a('.theme-install[data-slug="'+c.slug+'"]'),e=a(".install-theme-info").prepend(h)):(e=a('[data-slug="'+c.slug+'"]').removeClass("focus").addClass("theme-install-failed").append(h),f=e.find(".theme-install")),f.removeClass("updating-message").attr("aria-label",b.updates.l10n.themeInstallFailedLabel.replace("%s",f.data("name"))).text(b.updates.l10n.installFailedShort),b.a11y.speak(g,"assertive"),d.trigger("wp-theme-install-error",c)))},b.updates.deleteTheme=function(c){var e;return"themes"===pagenow?e=a(".theme-actions .delete-theme"):"themes-network"===pagenow&&(e=a('[data-slug="'+c.slug+'"]').find(".row-actions a.delete")),c=_.extend({success:b.updates.deleteThemeSuccess,error:b.updates.deleteThemeError},c),e&&e.html()!==b.updates.l10n.deleting&&e.data("originaltext",e.html()).text(b.updates.l10n.deleting),b.a11y.speak(b.updates.l10n.deleting,"polite"),a(".theme-info .update-message").remove(),d.trigger("wp-theme-deleting",c),b.updates.ajax("delete-theme",c)},b.updates.deleteThemeSuccess=function(e){var f=a('[data-slug="'+e.slug+'"]');"themes-network"===pagenow&&f.css({backgroundColor:"#faafaa"}).fadeOut(350,function(){var d=a(".subsubsub"),f=a(this),g=c.themes,h=b.template("item-deleted-row");f.hasClass("plugin-update-tr")||f.after(h({slug:e.slug,colspan:a("#bulk-action-form").find("thead th:not(.hidden), thead td").length,name:f.find(".theme-title strong").text()})),f.remove(),f.hasClass("update")&&(g.upgrade--,b.updates.decrementCount("theme")),f.hasClass("inactive")&&(g.disabled--,g.disabled?d.find(".disabled .count").text("("+g.disabled+")"):d.find(".disabled").remove()),d.find(".all .count").text("("+--g.all+")")}),b.a11y.speak(b.updates.l10n.themeDeleted,"polite"),d.trigger("wp-theme-delete-success",e)},b.updates.deleteThemeError=function(c){var e=a('tr.inactive[data-slug="'+c.slug+'"]'),f=a(".theme-actions .delete-theme"),g=b.template("item-update-row"),h=e.siblings("#"+c.slug+"-update"),i=b.updates.l10n.deleteFailed.replace("%s",c.errorMessage),j=b.updates.adminNotice({className:"update-message notice-error notice-alt",message:i});b.updates.maybeHandleCredentialError(c,"delete-theme")||("themes-network"===pagenow?h.length?(h.find(".notice-error").remove(),h.find(".plugin-update").append(j)):e.addClass("update").after(g({slug:c.slug,colspan:a("#bulk-action-form").find("thead th:not(.hidden), thead td").length,content:j})):a(".theme-info .theme-description").before(j),f.html(f.data("originaltext")),b.a11y.speak(i,"assertive"),d.trigger("wp-theme-delete-error",c))},b.updates._addCallbacks=function(a,c){return"import"===pagenow&&"install-plugin"===c&&(a.success=b.updates.installImporterSuccess,a.error=b.updates.installImporterError),a},b.updates.queueChecker=function(){var a;if(!b.updates.ajaxLocked&&b.updates.queue.length)switch(a=b.updates.queue.shift(),a.action){case"install-plugin":b.updates.installPlugin(a.data);break;case"update-plugin":b.updates.updatePlugin(a.data);break;case"delete-plugin":b.updates.deletePlugin(a.data);break;case"install-theme":b.updates.installTheme(a.data);break;case"update-theme":b.updates.updateTheme(a.data);break;case"delete-theme":b.updates.deleteTheme(a.data)}},b.updates.requestFilesystemCredentials=function(c){!1===b.updates.filesystemCredentials.available&&(c&&!b.updates.$elToReturnFocusToFromCredentialsModal&&(b.updates.$elToReturnFocusToFromCredentialsModal=a(c.target)),b.updates.ajaxLocked=!0,b.updates.requestForCredentialsModalOpen())},b.updates.maybeRequestFilesystemCredentials=function(a){b.updates.shouldRequestFilesystemCredentials&&!b.updates.ajaxLocked&&b.updates.requestFilesystemCredentials(a)},b.updates.keydown=function(c){27===c.keyCode?b.updates.requestForCredentialsModalCancel():9===c.keyCode&&("upgrade"!==c.target.id||c.shiftKey?"hostname"===c.target.id&&c.shiftKey&&(a("#upgrade").focus(),c.preventDefault()):(a("#hostname").focus(),c.preventDefault()))},b.updates.requestForCredentialsModalOpen=function(){var c=a("#request-filesystem-credentials-dialog");a("body").addClass("modal-open"),c.show(),c.find("input:enabled:first").focus(),c.on("keydown",b.updates.keydown)},b.updates.requestForCredentialsModalClose=function(){a("#request-filesystem-credentials-dialog").hide(),a("body").removeClass("modal-open"),b.updates.$elToReturnFocusToFromCredentialsModal&&b.updates.$elToReturnFocusToFromCredentialsModal.focus()},b.updates.requestForCredentialsModalCancel=function(){(b.updates.ajaxLocked||b.updates.queue.length)&&(_.each(b.updates.queue,function(a){d.trigger("credential-modal-cancel",a)}),b.updates.ajaxLocked=!1,b.updates.queue=[],b.updates.requestForCredentialsModalClose())},b.updates.showErrorInCredentialsForm=function(b){var c=a("#request-filesystem-credentials-form");c.find(".notice").remove(),c.find("#request-filesystem-credentials-title").after('<div class="notice notice-alt notice-error"><p>'+b+"</p></div>")},b.updates.credentialError=function(a,c){a=b.updates._addCallbacks(a,c),b.updates.queue.unshift({action:c,data:a}),b.updates.filesystemCredentials.available=!1,b.updates.showErrorInCredentialsForm(a.errorMessage),b.updates.requestFilesystemCredentials()},b.updates.maybeHandleCredentialError=function(a,c){return!(!b.updates.shouldRequestFilesystemCredentials||!a.errorCode||"unable_to_connect_to_filesystem"!==a.errorCode)&&(b.updates.credentialError(a,c),!0)},b.updates.isValidResponse=function(c,d){var e,f=b.updates.l10n.unknownError;if(_.isObject(c)&&!_.isFunction(c.always))return!0;switch(_.isString(c)&&"-1"===c?f=b.updates.l10n.nonceError:_.isString(c)?f=c:"undefined"!=typeof c.readyState&&0===c.readyState?f=b.updates.l10n.connectionError:_.isString(c.responseText)&&""!==c.responseText?f=c.responseText:_.isString(c.statusText)&&(f=c.statusText),d){case"update":e=b.updates.l10n.updateFailed;break;case"install":e=b.updates.l10n.installFailed;break;case"delete":e=b.updates.l10n.deleteFailed}return f=f.replace(/<[\/a-z][^<>]*>/gi,""),e=e.replace("%s",f),b.updates.addAdminNotice({id:"unknown_error",className:"notice-error is-dismissible",message:_.escape(e)}),b.updates.ajaxLocked=!1,b.updates.queue=[],a(".button.updating-message").removeClass("updating-message").removeAttr("aria-label").prop("disabled",!0).text(b.updates.l10n.updateFailedShort),a(".updating-message:not(.button):not(.thickbox)").removeClass("updating-message notice-warning").addClass("notice-error").find("p").removeAttr("aria-label").text(e),b.a11y.speak(e,"assertive"),!1},b.updates.beforeunload=function(){if(b.updates.ajaxLocked)return b.updates.l10n.beforeunload},a(function(){var e=a("#plugin-filter"),f=a("#bulk-action-form"),g=a("#request-filesystem-credentials-form"),h=a("#request-filesystem-credentials-dialog"),i=a(".plugins-php .wp-filter-search"),j=a(".plugin-install-php .wp-filter-search");c=_.extend(c,window._wpUpdatesItemCounts||{}),c.totals&&b.updates.refreshCount(),b.updates.shouldRequestFilesystemCredentials=h.length>0,h.on("submit","form",function(c){c.preventDefault(),b.updates.filesystemCredentials.ftp.hostname=a("#hostname").val(),b.updates.filesystemCredentials.ftp.username=a("#username").val(),b.updates.filesystemCredentials.ftp.password=a("#password").val(),b.updates.filesystemCredentials.ftp.connectionType=a('input[name="connection_type"]:checked').val(),b.updates.filesystemCredentials.ssh.publicKey=a("#public_key").val(),b.updates.filesystemCredentials.ssh.privateKey=a("#private_key").val(),b.updates.filesystemCredentials.fsNonce=a("#_fs_nonce").val(),b.updates.filesystemCredentials.available=!0,b.updates.ajaxLocked=!1,b.updates.queueChecker(),b.updates.requestForCredentialsModalClose()}),h.on("click",'[data-js-action="close"], .notification-dialog-background',b.updates.requestForCredentialsModalCancel),g.on("change",'input[name="connection_type"]',function(){a("#ssh-keys").toggleClass("hidden","ssh"!==a(this).val())}).change(),d.on("credential-modal-cancel",function(c,d){var e,f,g=a(".updating-message");"import"===pagenow?g.removeClass("updating-message"):"plugins"===pagenow||"plugins-network"===pagenow?"update-plugin"===d.action?e=a('tr[data-plugin="'+d.data.plugin+'"]').find(".update-message"):"delete-plugin"===d.action&&(e=a('[data-plugin="'+d.data.plugin+'"]').find(".row-actions a.delete")):"themes"===pagenow||"themes-network"===pagenow?"update-theme"===d.action?e=a('[data-slug="'+d.data.slug+'"]').find(".update-message"):"delete-theme"===d.action&&"themes-network"===pagenow?e=a('[data-slug="'+d.data.slug+'"]').find(".row-actions a.delete"):"delete-theme"===d.action&&"themes"===pagenow&&(e=a(".theme-actions .delete-theme")):e=g,e&&e.hasClass("updating-message")&&(f=e.data("originaltext"),"undefined"==typeof f&&(f=a("<p>").html(e.find("p").data("originaltext"))),e.removeClass("updating-message").html(f),"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||("update-plugin"===d.action?e.attr("aria-label",b.updates.l10n.pluginUpdateNowLabel.replace("%s",e.data("name"))):"install-plugin"===d.action&&e.attr("aria-label",b.updates.l10n.pluginInstallNowLabel.replace("%s",e.data("name"))))),b.a11y.speak(b.updates.l10n.updateCancel,"polite")}),f.on("click","[data-plugin] .update-link",function(c){var d=a(c.target),e=d.parents("tr");c.preventDefault(),d.hasClass("updating-message")||d.hasClass("button-disabled")||(b.updates.maybeRequestFilesystemCredentials(c),b.updates.$elToReturnFocusToFromCredentialsModal=e.find(".check-column input"),b.updates.updatePlugin({plugin:e.data("plugin"),slug:e.data("slug")}))}),e.on("click",".update-now",function(c){var d=a(c.target);c.preventDefault(),d.hasClass("updating-message")||d.hasClass("button-disabled")||(b.updates.maybeRequestFilesystemCredentials(c),b.updates.updatePlugin({plugin:d.data("plugin"),slug:d.data("slug")}))}),e.on("click",".install-now",function(c){var e=a(c.target);c.preventDefault(),e.hasClass("updating-message")||e.hasClass("button-disabled")||(b.updates.shouldRequestFilesystemCredentials&&!b.updates.ajaxLocked&&(b.updates.requestFilesystemCredentials(c),d.on("credential-modal-cancel",function(){var c=a(".install-now.updating-message");c.removeClass("updating-message").text(b.updates.l10n.installNow),b.a11y.speak(b.updates.l10n.updateCancel,"polite")})),b.updates.installPlugin({slug:e.data("slug")}))}),d.on("click",".importer-item .install-now",function(c){var e=a(c.target),f=a(this).data("name");c.preventDefault(),e.hasClass("updating-message")||(b.updates.shouldRequestFilesystemCredentials&&!b.updates.ajaxLocked&&(b.updates.requestFilesystemCredentials(c),d.on("credential-modal-cancel",function(){e.removeClass("updating-message").text(b.updates.l10n.installNow).attr("aria-label",b.updates.l10n.installNowLabel.replace("%s",f)),b.a11y.speak(b.updates.l10n.updateCancel,"polite")})),b.updates.installPlugin({slug:e.data("slug"),pagenow:pagenow,success:b.updates.installImporterSuccess,error:b.updates.installImporterError}))}),f.on("click","[data-plugin] a.delete",function(c){var d=a(c.target).parents("tr");c.preventDefault(),window.confirm(b.updates.l10n.aysDeleteUninstall.replace("%s",d.find(".plugin-title strong").text()))&&(b.updates.maybeRequestFilesystemCredentials(c),b.updates.deletePlugin({plugin:d.data("plugin"),slug:d.data("slug")}))}),d.on("click",".themes-php.network-admin .update-link",function(c){var d=a(c.target),e=d.parents("tr");c.preventDefault(),d.hasClass("updating-message")||d.hasClass("button-disabled")||(b.updates.maybeRequestFilesystemCredentials(c),b.updates.$elToReturnFocusToFromCredentialsModal=e.find(".check-column input"),b.updates.updateTheme({slug:e.data("slug")}))}),d.on("click",".themes-php.network-admin a.delete",function(c){var d=a(c.target).parents("tr");c.preventDefault(),window.confirm(b.updates.l10n.aysDelete.replace("%s",d.find(".theme-title strong").text()))&&(b.updates.maybeRequestFilesystemCredentials(c),b.updates.deleteTheme({slug:d.data("slug")}))}),f.on("click",'[type="submit"]:not([name="clear-recent-list"])',function(c){var e,g,h=a(c.target).siblings("select").val(),i=f.find('input[name="checked[]"]:checked'),j=0,k=0,l=[];switch(pagenow){case"plugins":case"plugins-network":e="plugin";break;case"themes-network":e="theme";break;default:return}if(!i.length)return c.preventDefault(),a("html, body").animate({scrollTop:0}),b.updates.addAdminNotice({id:"no-items-selected",className:"notice-error is-dismissible",message:b.updates.l10n.noItemsSelected});switch(h){case"update-selected":g=h.replace("selected",e);break;case"delete-selected":if(!window.confirm("plugin"===e?b.updates.l10n.aysBulkDelete:b.updates.l10n.aysBulkDeleteThemes))return void c.preventDefault();g=h.replace("selected",e);break;default:return}b.updates.maybeRequestFilesystemCredentials(c),c.preventDefault(),f.find('.manage-column [type="checkbox"]').prop("checked",!1),d.trigger("wp-"+e+"-bulk-"+h,i),i.each(function(c,d){var e=a(d),f=e.parents("tr");return"update-selected"!==h||f.hasClass("update")&&!f.find("notice-error").length?void b.updates.queue.push({action:g,data:{plugin:f.data("plugin"),slug:f.data("slug")}}):void e.prop("checked",!1)}),d.on("wp-plugin-update-success wp-plugin-update-error wp-theme-update-success wp-theme-update-error",function(c,d){var e,f,g=a('[data-slug="'+d.slug+'"]');"wp-"+d.update+"-update-success"===c.type?j++:(f=d.pluginName?d.pluginName:g.find(".column-primary strong").text(),k++,l.push(f+": "+d.errorMessage)),g.find('input[name="checked[]"]:checked').prop("checked",!1),b.updates.adminNotice=b.template("wp-bulk-updates-admin-notice"),b.updates.addAdminNotice({id:"bulk-action-notice",className:"bulk-action-notice",successes:j,errors:k,errorMessages:l,type:d.update}),e=a("#bulk-action-notice").on("click","button",function(){a(this).toggleClass("bulk-action-errors-collapsed").attr("aria-expanded",!a(this).hasClass("bulk-action-errors-collapsed")),e.find(".bulk-action-errors").toggleClass("hidden")}),k>0&&!b.updates.queue.length&&a("html, body").animate({scrollTop:0})}),d.on("wp-updates-notice-added",function(){b.updates.adminNotice=b.template("wp-updates-admin-notice")}),b.updates.queueChecker()}),j.length&&j.attr("aria-describedby","live-search-desc"),j.on("keyup input",_.debounce(function(c,d){var f,g,h=a(".plugin-install-search");f={_ajax_nonce:b.updates.ajaxNonce,s:c.target.value,tab:"search",type:a("#typeselector").val(),pagenow:pagenow},g=location.href.split("?")[0]+"?"+a.param(_.omit(f,["_ajax_nonce","pagenow"])),"keyup"===c.type&&27===c.which&&(c.target.value=""),b.updates.searchTerm===f.s&&"typechange"!==d||(e.empty(),
b.updates.searchTerm=f.s,window.history&&window.history.replaceState&&window.history.replaceState(null,"",g),h.length||(h=a('<li class="plugin-install-search" />').append(a("<a />",{"class":"current",href:g,text:b.updates.l10n.searchResultsLabel})),a(".wp-filter .filter-links .current").removeClass("current").parents(".filter-links").prepend(h),e.prev("p").remove(),a(".plugins-popular-tags-wrapper").remove()),"undefined"!=typeof b.updates.searchRequest&&b.updates.searchRequest.abort(),a("body").addClass("loading-content"),b.updates.searchRequest=b.ajax.post("search-install-plugins",f).done(function(c){a("body").removeClass("loading-content"),e.append(c.items),delete b.updates.searchRequest,0===c.count?b.a11y.speak(b.updates.l10n.noPluginsFound):b.a11y.speak(b.updates.l10n.pluginsFound.replace("%d",c.count))}))},500)),i.length&&i.attr("aria-describedby","live-search-desc"),i.on("keyup input",_.debounce(function(c){var d,e={_ajax_nonce:b.updates.ajaxNonce,s:c.target.value,pagenow:pagenow,plugin_status:"all"};"keyup"===c.type&&27===c.which&&(c.target.value=""),b.updates.searchTerm!==e.s&&(b.updates.searchTerm=e.s,d=_.object(_.compact(_.map(location.search.slice(1).split("&"),function(a){if(a)return a.split("=")}))),e.plugin_status=d.plugin_status||"all",window.history&&window.history.replaceState&&window.history.replaceState(null,"",location.href.split("?")[0]+"?s="+e.s+"&plugin_status="+e.plugin_status),"undefined"!=typeof b.updates.searchRequest&&b.updates.searchRequest.abort(),f.empty(),a("body").addClass("loading-content"),a(".subsubsub .current").removeClass("current"),b.updates.searchRequest=b.ajax.post("search-plugins",e).done(function(c){var d=a("<span />").addClass("subtitle").html(b.updates.l10n.searchResults.replace("%s",_.escape(e.s))),g=a(".wrap .subtitle");e.s.length?g.length?g.replaceWith(d):a(".wp-header-end").before(d):(g.remove(),a(".subsubsub ."+e.plugin_status+" a").addClass("current")),a("body").removeClass("loading-content"),f.append(c.items),delete b.updates.searchRequest,0===c.count?b.a11y.speak(b.updates.l10n.noPluginsFound):b.a11y.speak(b.updates.l10n.pluginsFound.replace("%d",c.count))}))},500)),d.on("submit",".search-plugins",function(b){b.preventDefault(),a("input.wp-filter-search").trigger("input")}),d.on("click",".try-again",function(a){a.preventDefault(),j.trigger("input")}),a("#typeselector").on("change",function(){var b=a('input[name="s"]');b.val().length&&b.trigger("input","typechange")}),a("#plugin_update_from_iframe").on("click",function(b){var c,d=window.parent===window?null:window.parent;a.support.postMessage=!!window.postMessage,!1!==a.support.postMessage&&null!==d&&-1===window.parent.location.pathname.indexOf("update-core.php")&&(b.preventDefault(),c={action:"update-plugin",data:{plugin:a(this).data("plugin"),slug:a(this).data("slug")}},d.postMessage(JSON.stringify(c),window.location.origin))}),a("#plugin_install_from_iframe").on("click",function(b){var c,d=window.parent===window?null:window.parent;a.support.postMessage=!!window.postMessage,!1!==a.support.postMessage&&null!==d&&-1===window.parent.location.pathname.indexOf("index.php")&&(b.preventDefault(),c={action:"install-plugin",data:{slug:a(this).data("slug")}},d.postMessage(JSON.stringify(c),window.location.origin))}),a(window).on("message",function(c){var d,e=c.originalEvent,f=document.location.protocol+"//"+document.location.hostname;if(e.origin===f){try{d=a.parseJSON(e.data)}catch(g){return}if(d&&"undefined"!=typeof d.action)switch(d.action){case"decrementUpdateCount":b.updates.decrementCount(d.upgradeType);break;case"install-plugin":case"update-plugin":window.tb_remove(),d.data=b.updates._addCallbacks(d.data,d.action),b.updates.queue.push(d),b.updates.queueChecker()}}}),a(window).on("beforeunload",b.updates.beforeunload)})}(jQuery,window.wp,window._wpUpdatesSettings);home/xbodynamge/namtation/wp-admin/js/updates.min.js000064400000105455151124672050016555 0ustar00!function(r,o,d){var p=r(document);(o=o||{}).updates={},o.updates.ajaxNonce=d.ajax_nonce,o.updates.l10n=d.l10n,o.updates.searchTerm="",o.updates.shouldRequestFilesystemCredentials=!1,o.updates.filesystemCredentials={ftp:{host:"",username:"",password:"",connectionType:""},ssh:{publicKey:"",privateKey:""},fsNonce:"",available:!1},o.updates.ajaxLocked=!1,o.updates.adminNotice=o.template("wp-updates-admin-notice"),o.updates.queue=[],o.updates.$elToReturnFocusToFromCredentialsModal=void 0,o.updates.addAdminNotice=function(e){var t,a=r(e.selector),s=r(".wp-header-end");delete e.selector,t=o.updates.adminNotice(e),(a=!a.length?r("#"+e.id):a).length?a.replaceWith(t):s.length?s.after(t):"customize"===pagenow?r(".customize-themes-notifications").append(t):r(".wrap").find("> h1").after(t),p.trigger("wp-updates-notice-added")},o.updates.ajax=function(e,t){var a={};return o.updates.ajaxLocked?(o.updates.queue.push({action:e,data:t}),r.Deferred()):(o.updates.ajaxLocked=!0,t.success&&(a.success=t.success,delete t.success),t.error&&(a.error=t.error,delete t.error),a.data=_.extend(t,{action:e,_ajax_nonce:o.updates.ajaxNonce,_fs_nonce:o.updates.filesystemCredentials.fsNonce,username:o.updates.filesystemCredentials.ftp.username,password:o.updates.filesystemCredentials.ftp.password,hostname:o.updates.filesystemCredentials.ftp.hostname,connection_type:o.updates.filesystemCredentials.ftp.connectionType,public_key:o.updates.filesystemCredentials.ssh.publicKey,private_key:o.updates.filesystemCredentials.ssh.privateKey}),o.ajax.send(a).always(o.updates.ajaxAlways))},o.updates.ajaxAlways=function(e){e.errorCode&&"unable_to_connect_to_filesystem"===e.errorCode||(o.updates.ajaxLocked=!1,o.updates.queueChecker()),void 0!==e.debug&&window.console&&window.console.log&&_.map(e.debug,function(e){window.console.log(o.sanitize.stripTagsAndEncodeText(e))})},o.updates.refreshCount=function(){var e,t=r("#wp-admin-bar-updates"),a=r('a[href="update-core.php"] .update-plugins'),s=r('a[href="plugins.php"] .update-plugins'),n=r('a[href="themes.php"] .update-plugins');t.find(".ab-item").removeAttr("title"),t.find(".ab-label").text(d.totals.counts.total),0===d.totals.counts.total&&t.find(".ab-label").parents("li").remove(),a.each(function(e,t){t.className=t.className.replace(/count-\d+/,"count-"+d.totals.counts.total)}),0<d.totals.counts.total?a.find(".update-count").text(d.totals.counts.total):a.remove(),s.each(function(e,t){t.className=t.className.replace(/count-\d+/,"count-"+d.totals.counts.plugins)}),0<d.totals.counts.total?s.find(".plugin-count").text(d.totals.counts.plugins):s.remove(),n.each(function(e,t){t.className=t.className.replace(/count-\d+/,"count-"+d.totals.counts.themes)}),0<d.totals.counts.total?n.find(".theme-count").text(d.totals.counts.themes):n.remove(),"plugins"===pagenow||"plugins-network"===pagenow?e=d.totals.counts.plugins:"themes"!==pagenow&&"themes-network"!==pagenow||(e=d.totals.counts.themes),0<e?r(".subsubsub .upgrade .count").text("("+e+")"):(r(".subsubsub .upgrade").remove(),r(".subsubsub li:last").html(function(){return r(this).children()}))},o.updates.decrementCount=function(e){d.totals.counts.total=Math.max(--d.totals.counts.total,0),"plugin"===e?d.totals.counts.plugins=Math.max(--d.totals.counts.plugins,0):"theme"===e&&(d.totals.counts.themes=Math.max(--d.totals.counts.themes,0)),o.updates.refreshCount(e)},o.updates.updatePlugin=function(e){var t,a,s;return e=_.extend({success:o.updates.updatePluginSuccess,error:o.updates.updatePluginError},e),"plugins"===pagenow||"plugins-network"===pagenow?(a=(t=r('tr[data-plugin="'+e.plugin+'"]')).find(".update-message").removeClass("notice-error").addClass("updating-message notice-warning").find("p"),s=o.updates.l10n.pluginUpdatingLabel.replace("%s",t.find(".plugin-title strong").text())):"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||(a=(t=r(".plugin-card-"+e.slug)).find(".update-now").addClass("updating-message"),s=o.updates.l10n.pluginUpdatingLabel.replace("%s",a.data("name")),t.removeClass("plugin-card-update-failed").find(".notice.notice-error").remove()),a.html()!==o.updates.l10n.updating&&a.data("originaltext",a.html()),a.attr("aria-label",s).text(o.updates.l10n.updating),p.trigger("wp-plugin-updating",e),o.updates.ajax("update-plugin",e)},o.updates.updatePluginSuccess=function(e){var t,a,s;"plugins"===pagenow||"plugins-network"===pagenow?(a=(t=r('tr[data-plugin="'+e.plugin+'"]').removeClass("update").addClass("updated")).find(".update-message").removeClass("updating-message notice-warning").addClass("updated-message notice-success").find("p"),s=t.find(".plugin-version-author-uri").html().replace(e.oldVersion,e.newVersion),t.find(".plugin-version-author-uri").html(s)):"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||(a=r(".plugin-card-"+e.slug).find(".update-now").removeClass("updating-message").addClass("button-disabled updated-message")),a.attr("aria-label",o.updates.l10n.pluginUpdatedLabel.replace("%s",e.pluginName)).text(o.updates.l10n.pluginUpdated),o.a11y.speak(o.updates.l10n.updatedMsg,"polite"),o.updates.decrementCount("plugin"),p.trigger("wp-plugin-update-success",e)},o.updates.updatePluginError=function(e){var t,a,s;o.updates.isValidResponse(e,"update")&&(o.updates.maybeHandleCredentialError(e,"update-plugin")||(s=o.updates.l10n.updateFailed.replace("%s",e.errorMessage),"plugins"===pagenow||"plugins-network"===pagenow?((a=(e.plugin?r('tr[data-plugin="'+e.plugin+'"]'):r('tr[data-slug="'+e.slug+'"]')).find(".update-message")).removeClass("updating-message notice-warning").addClass("notice-error").find("p").html(s),e.pluginName?a.find("p").attr("aria-label",o.updates.l10n.pluginUpdateFailedLabel.replace("%s",e.pluginName)):a.find("p").removeAttr("aria-label")):"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||((t=r(".plugin-card-"+e.slug).addClass("plugin-card-update-failed").append(o.updates.adminNotice({className:"update-message notice-error notice-alt is-dismissible",message:s}))).find(".update-now").text(o.updates.l10n.updateFailedShort).removeClass("updating-message"),e.pluginName?t.find(".update-now").attr("aria-label",o.updates.l10n.pluginUpdateFailedLabel.replace("%s",e.pluginName)):t.find(".update-now").removeAttr("aria-label"),t.on("click",".notice.is-dismissible .notice-dismiss",function(){setTimeout(function(){t.removeClass("plugin-card-update-failed").find(".column-name a").focus(),t.find(".update-now").attr("aria-label",!1).text(o.updates.l10n.updateNow)},200)})),o.a11y.speak(s,"assertive"),p.trigger("wp-plugin-update-error",e)))},o.updates.installPlugin=function(e){var t=r(".plugin-card-"+e.slug),a=t.find(".install-now");return e=_.extend({success:o.updates.installPluginSuccess,error:o.updates.installPluginError},e),(a="import"===pagenow?r('[data-slug="'+e.slug+'"]'):a).html()!==o.updates.l10n.installing&&a.data("originaltext",a.html()),a.addClass("updating-message").attr("aria-label",o.updates.l10n.pluginInstallingLabel.replace("%s",a.data("name"))).text(o.updates.l10n.installing),o.a11y.speak(o.updates.l10n.installingMsg,"polite"),t.removeClass("plugin-card-install-failed").find(".notice.notice-error").remove(),p.trigger("wp-plugin-installing",e),o.updates.ajax("install-plugin",e)},o.updates.installPluginSuccess=function(e){var t=r(".plugin-card-"+e.slug).find(".install-now");t.removeClass("updating-message").addClass("updated-message installed button-disabled").attr("aria-label",o.updates.l10n.pluginInstalledLabel.replace("%s",e.pluginName)).text(o.updates.l10n.pluginInstalled),o.a11y.speak(o.updates.l10n.installedMsg,"polite"),p.trigger("wp-plugin-install-success",e),e.activateUrl&&setTimeout(function(){t.removeClass("install-now installed button-disabled updated-message").addClass("activate-now button-primary").attr("href",e.activateUrl).attr("aria-label",o.updates.l10n.activatePluginLabel.replace("%s",e.pluginName)).text(o.updates.l10n.activatePlugin)},1e3)},o.updates.installPluginError=function(e){var t,a=r(".plugin-card-"+e.slug),s=a.find(".install-now");o.updates.isValidResponse(e,"install")&&(o.updates.maybeHandleCredentialError(e,"install-plugin")||(t=o.updates.l10n.installFailed.replace("%s",e.errorMessage),a.addClass("plugin-card-update-failed").append('<div class="notice notice-error notice-alt is-dismissible"><p>'+t+"</p></div>"),a.on("click",".notice.is-dismissible .notice-dismiss",function(){setTimeout(function(){a.removeClass("plugin-card-update-failed").find(".column-name a").focus()},200)}),s.removeClass("updating-message").addClass("button-disabled").attr("aria-label",o.updates.l10n.pluginInstallFailedLabel.replace("%s",s.data("name"))).text(o.updates.l10n.installFailedShort),o.a11y.speak(t,"assertive"),p.trigger("wp-plugin-install-error",e)))},o.updates.installImporterSuccess=function(e){o.updates.addAdminNotice({id:"install-success",className:"notice-success is-dismissible",message:o.updates.l10n.importerInstalledMsg.replace("%s",e.activateUrl+"&from=import")}),r('[data-slug="'+e.slug+'"]').removeClass("install-now updating-message").addClass("activate-now").attr({href:e.activateUrl+"&from=import","aria-label":o.updates.l10n.activateImporterLabel.replace("%s",e.pluginName)}).text(o.updates.l10n.activateImporter),o.a11y.speak(o.updates.l10n.installedMsg,"polite"),p.trigger("wp-importer-install-success",e)},o.updates.installImporterError=function(e){var t=o.updates.l10n.installFailed.replace("%s",e.errorMessage),a=r('[data-slug="'+e.slug+'"]'),s=a.data("name");o.updates.isValidResponse(e,"install")&&(o.updates.maybeHandleCredentialError(e,"install-plugin")||(o.updates.addAdminNotice({id:e.errorCode,className:"notice-error is-dismissible",message:t}),a.removeClass("updating-message").text(o.updates.l10n.installNow).attr("aria-label",o.updates.l10n.pluginInstallNowLabel.replace("%s",s)),o.a11y.speak(t,"assertive"),p.trigger("wp-importer-install-error",e)))},o.updates.deletePlugin=function(e){var t=r('[data-plugin="'+e.plugin+'"]').find(".row-actions a.delete");return e=_.extend({success:o.updates.deletePluginSuccess,error:o.updates.deletePluginError},e),t.html()!==o.updates.l10n.deleting&&t.data("originaltext",t.html()).text(o.updates.l10n.deleting),o.a11y.speak(o.updates.l10n.deleting,"polite"),p.trigger("wp-plugin-deleting",e),o.updates.ajax("delete-plugin",e)},o.updates.deletePluginSuccess=function(i){r('[data-plugin="'+i.plugin+'"]').css({backgroundColor:"#faafaa"}).fadeOut(350,function(){var e=r("#bulk-action-form"),t=r(".subsubsub"),a=r(this),s=e.find("thead th:not(.hidden), thead td").length,n=o.template("item-deleted-row"),l=d.plugins;a.hasClass("plugin-update-tr")||a.after(n({slug:i.slug,plugin:i.plugin,colspan:s,name:i.pluginName})),a.remove(),-1!==_.indexOf(l.upgrade,i.plugin)&&(l.upgrade=_.without(l.upgrade,i.plugin),o.updates.decrementCount("plugin")),-1!==_.indexOf(l.inactive,i.plugin)&&(l.inactive=_.without(l.inactive,i.plugin),l.inactive.length?t.find(".inactive .count").text("("+l.inactive.length+")"):t.find(".inactive").remove()),-1!==_.indexOf(l.active,i.plugin)&&(l.active=_.without(l.active,i.plugin),l.active.length?t.find(".active .count").text("("+l.active.length+")"):t.find(".active").remove()),-1!==_.indexOf(l.recently_activated,i.plugin)&&(l.recently_activated=_.without(l.recently_activated,i.plugin),l.recently_activated.length?t.find(".recently_activated .count").text("("+l.recently_activated.length+")"):t.find(".recently_activated").remove()),l.all=_.without(l.all,i.plugin),l.all.length?t.find(".all .count").text("("+l.all.length+")"):(e.find(".tablenav").css({visibility:"hidden"}),t.find(".all").remove(),e.find("tr.no-items").length||e.find("#the-list").append('<tr class="no-items"><td class="colspanchange" colspan="'+s+'">'+o.updates.l10n.noPlugins+"</td></tr>"))}),o.a11y.speak(o.updates.l10n.pluginDeleted,"polite"),p.trigger("wp-plugin-delete-success",i)},o.updates.deletePluginError=function(e){var t,a=o.template("item-update-row"),s=o.updates.adminNotice({className:"update-message notice-error notice-alt",message:e.errorMessage}),n=e.plugin?(t=r('tr.inactive[data-plugin="'+e.plugin+'"]')).siblings('[data-plugin="'+e.plugin+'"]'):(t=r('tr.inactive[data-slug="'+e.slug+'"]')).siblings('[data-slug="'+e.slug+'"]');o.updates.isValidResponse(e,"delete")&&(o.updates.maybeHandleCredentialError(e,"delete-plugin")||(n.length?(n.find(".notice-error").remove(),n.find(".plugin-update").append(s)):t.addClass("update").after(a({slug:e.slug,plugin:e.plugin||e.slug,colspan:r("#bulk-action-form").find("thead th:not(.hidden), thead td").length,content:s})),p.trigger("wp-plugin-delete-error",e)))},o.updates.updateTheme=function(e){var t;return e=_.extend({success:o.updates.updateThemeSuccess,error:o.updates.updateThemeError},e),(t="themes-network"===pagenow?r('[data-slug="'+e.slug+'"]').find(".update-message").removeClass("notice-error").addClass("updating-message notice-warning").find("p"):"customize"===pagenow?((t=r('[data-slug="'+e.slug+'"].notice').removeClass("notice-large")).find("h3").remove(),(t=t.add(r("#customize-control-installed_theme_"+e.slug).find(".update-message"))).addClass("updating-message").find("p")):((t=r("#update-theme").closest(".notice").removeClass("notice-large")).find("h3").remove(),(t=t.add(r('[data-slug="'+e.slug+'"]').find(".update-message"))).addClass("updating-message").find("p"))).html()!==o.updates.l10n.updating&&t.data("originaltext",t.html()),o.a11y.speak(o.updates.l10n.updatingMsg,"polite"),t.text(o.updates.l10n.updating),p.trigger("wp-theme-updating",e),o.updates.ajax("update-theme",e)},o.updates.updateThemeSuccess=function(e){var t,a,s=r("body.modal-open").length,n=r('[data-slug="'+e.slug+'"]'),l={className:"updated-message notice-success notice-alt",message:o.updates.l10n.themeUpdated};"customize"===pagenow?((n=r(".updating-message").siblings(".theme-name")).length&&(a=n.html().replace(e.oldVersion,e.newVersion),n.html(a)),t=r(".theme-info .notice").add(o.customize.control("installed_theme_"+e.slug).container.find(".theme").find(".update-message"))):"themes-network"===pagenow?(t=n.find(".update-message"),a=n.find(".theme-version-author-uri").html().replace(e.oldVersion,e.newVersion),n.find(".theme-version-author-uri").html(a)):(t=r(".theme-info .notice").add(n.find(".update-message")),(s?r(".load-customize:visible"):n.find(".load-customize")).focus()),o.updates.addAdminNotice(_.extend({selector:t},l)),o.a11y.speak(o.updates.l10n.updatedMsg,"polite"),o.updates.decrementCount("theme"),p.trigger("wp-theme-update-success",e),s&&"customize"!==pagenow&&r(".theme-info .theme-author").after(o.updates.adminNotice(l))},o.updates.updateThemeError=function(e){var t,a=r('[data-slug="'+e.slug+'"]'),s=o.updates.l10n.updateFailed.replace("%s",e.errorMessage);o.updates.isValidResponse(e,"update")&&(o.updates.maybeHandleCredentialError(e,"update-theme")||("customize"===pagenow&&(a=o.customize.control("installed_theme_"+e.slug).container.find(".theme")),"themes-network"===pagenow?t=a.find(".update-message "):(t=r(".theme-info .notice").add(a.find(".notice")),(r("body.modal-open").length?r(".load-customize:visible"):a.find(".load-customize")).focus()),o.updates.addAdminNotice({selector:t,className:"update-message notice-error notice-alt is-dismissible",message:s}),o.a11y.speak(s,"polite"),p.trigger("wp-theme-update-error",e)))},o.updates.installTheme=function(e){var t=r('.theme-install[data-slug="'+e.slug+'"]');return e=_.extend({success:o.updates.installThemeSuccess,error:o.updates.installThemeError},e),t.addClass("updating-message"),t.parents(".theme").addClass("focus"),t.html()!==o.updates.l10n.installing&&t.data("originaltext",t.html()),t.text(o.updates.l10n.installing).attr("aria-label",o.updates.l10n.themeInstallingLabel.replace("%s",t.data("name"))),o.a11y.speak(o.updates.l10n.installingMsg,"polite"),r('.install-theme-info, [data-slug="'+e.slug+'"]').removeClass("theme-install-failed").find(".notice.notice-error").remove(),p.trigger("wp-theme-installing",e),o.updates.ajax("install-theme",e)},o.updates.installThemeSuccess=function(e){var t,a=r(".wp-full-overlay-header, [data-slug="+e.slug+"]");p.trigger("wp-theme-install-success",e),t=a.find(".button-primary").removeClass("updating-message").addClass("updated-message disabled").attr("aria-label",o.updates.l10n.themeInstalledLabel.replace("%s",e.themeName)).text(o.updates.l10n.themeInstalled),o.a11y.speak(o.updates.l10n.installedMsg,"polite"),setTimeout(function(){e.activateUrl&&t.attr("href",e.activateUrl).removeClass("theme-install updated-message disabled").addClass("activate").attr("aria-label",o.updates.l10n.activateThemeLabel.replace("%s",e.themeName)).text(o.updates.l10n.activateTheme),e.customizeUrl&&t.siblings(".preview").replaceWith(function(){return r("<a>").attr("href",e.customizeUrl).addClass("button load-customize").text(o.updates.l10n.livePreview)})},1e3)},o.updates.installThemeError=function(e){var t,a=o.updates.l10n.installFailed.replace("%s",e.errorMessage),s=o.updates.adminNotice({className:"update-message notice-error notice-alt",message:a});o.updates.isValidResponse(e,"install")&&(o.updates.maybeHandleCredentialError(e,"install-theme")||("customize"===pagenow?(p.find("body").hasClass("modal-open")?(t=r('.theme-install[data-slug="'+e.slug+'"]'),r(".theme-overlay .theme-info").prepend(s)):(t=r('.theme-install[data-slug="'+e.slug+'"]')).closest(".theme").addClass("theme-install-failed").append(s),o.customize.notifications.remove("theme_installing")):p.find("body").hasClass("full-overlay-active")?(t=r('.theme-install[data-slug="'+e.slug+'"]'),r(".install-theme-info").prepend(s)):t=r('[data-slug="'+e.slug+'"]').removeClass("focus").addClass("theme-install-failed").append(s).find(".theme-install"),t.removeClass("updating-message").attr("aria-label",o.updates.l10n.themeInstallFailedLabel.replace("%s",t.data("name"))).text(o.updates.l10n.installFailedShort),o.a11y.speak(a,"assertive"),p.trigger("wp-theme-install-error",e)))},o.updates.deleteTheme=function(e){var t;return"themes"===pagenow?t=r(".theme-actions .delete-theme"):"themes-network"===pagenow&&(t=r('[data-slug="'+e.slug+'"]').find(".row-actions a.delete")),e=_.extend({success:o.updates.deleteThemeSuccess,error:o.updates.deleteThemeError},e),t&&t.html()!==o.updates.l10n.deleting&&t.data("originaltext",t.html()).text(o.updates.l10n.deleting),o.a11y.speak(o.updates.l10n.deleting,"polite"),r(".theme-info .update-message").remove(),p.trigger("wp-theme-deleting",e),o.updates.ajax("delete-theme",e)},o.updates.deleteThemeSuccess=function(n){var e=r('[data-slug="'+n.slug+'"]');"themes-network"===pagenow&&e.css({backgroundColor:"#faafaa"}).fadeOut(350,function(){var e=r(".subsubsub"),t=r(this),a=d.themes,s=o.template("item-deleted-row");t.hasClass("plugin-update-tr")||t.after(s({slug:n.slug,colspan:r("#bulk-action-form").find("thead th:not(.hidden), thead td").length,name:t.find(".theme-title strong").text()})),t.remove(),t.hasClass("update")&&(a.upgrade--,o.updates.decrementCount("theme")),t.hasClass("inactive")&&(a.disabled--,a.disabled?e.find(".disabled .count").text("("+a.disabled+")"):e.find(".disabled").remove()),e.find(".all .count").text("("+--a.all+")")}),o.a11y.speak(o.updates.l10n.themeDeleted,"polite"),p.trigger("wp-theme-delete-success",n)},o.updates.deleteThemeError=function(e){var t=r('tr.inactive[data-slug="'+e.slug+'"]'),a=r(".theme-actions .delete-theme"),s=o.template("item-update-row"),n=t.siblings("#"+e.slug+"-update"),l=o.updates.l10n.deleteFailed.replace("%s",e.errorMessage),i=o.updates.adminNotice({className:"update-message notice-error notice-alt",message:l});o.updates.maybeHandleCredentialError(e,"delete-theme")||("themes-network"===pagenow?n.length?(n.find(".notice-error").remove(),n.find(".plugin-update").append(i)):t.addClass("update").after(s({slug:e.slug,colspan:r("#bulk-action-form").find("thead th:not(.hidden), thead td").length,content:i})):r(".theme-info .theme-description").before(i),a.html(a.data("originaltext")),o.a11y.speak(l,"assertive"),p.trigger("wp-theme-delete-error",e))},o.updates._addCallbacks=function(e,t){return"import"===pagenow&&"install-plugin"===t&&(e.success=o.updates.installImporterSuccess,e.error=o.updates.installImporterError),e},o.updates.queueChecker=function(){var e;if(!o.updates.ajaxLocked&&o.updates.queue.length)switch((e=o.updates.queue.shift()).action){case"install-plugin":o.updates.installPlugin(e.data);break;case"update-plugin":o.updates.updatePlugin(e.data);break;case"delete-plugin":o.updates.deletePlugin(e.data);break;case"install-theme":o.updates.installTheme(e.data);break;case"update-theme":o.updates.updateTheme(e.data);break;case"delete-theme":o.updates.deleteTheme(e.data)}},o.updates.requestFilesystemCredentials=function(e){!1===o.updates.filesystemCredentials.available&&(e&&!o.updates.$elToReturnFocusToFromCredentialsModal&&(o.updates.$elToReturnFocusToFromCredentialsModal=r(e.target)),o.updates.ajaxLocked=!0,o.updates.requestForCredentialsModalOpen())},o.updates.maybeRequestFilesystemCredentials=function(e){o.updates.shouldRequestFilesystemCredentials&&!o.updates.ajaxLocked&&o.updates.requestFilesystemCredentials(e)},o.updates.keydown=function(e){27===e.keyCode?o.updates.requestForCredentialsModalCancel():9===e.keyCode&&("upgrade"!==e.target.id||e.shiftKey?"hostname"===e.target.id&&e.shiftKey&&(r("#upgrade").focus(),e.preventDefault()):(r("#hostname").focus(),e.preventDefault()))},o.updates.requestForCredentialsModalOpen=function(){var e=r("#request-filesystem-credentials-dialog");r("body").addClass("modal-open"),e.show(),e.find("input:enabled:first").focus(),e.on("keydown",o.updates.keydown)},o.updates.requestForCredentialsModalClose=function(){r("#request-filesystem-credentials-dialog").hide(),r("body").removeClass("modal-open"),o.updates.$elToReturnFocusToFromCredentialsModal&&o.updates.$elToReturnFocusToFromCredentialsModal.focus()},o.updates.requestForCredentialsModalCancel=function(){(o.updates.ajaxLocked||o.updates.queue.length)&&(_.each(o.updates.queue,function(e){p.trigger("credential-modal-cancel",e)}),o.updates.ajaxLocked=!1,o.updates.queue=[],o.updates.requestForCredentialsModalClose())},o.updates.showErrorInCredentialsForm=function(e){var t=r("#request-filesystem-credentials-form");t.find(".notice").remove(),t.find("#request-filesystem-credentials-title").after('<div class="notice notice-alt notice-error"><p>'+e+"</p></div>")},o.updates.credentialError=function(e,t){e=o.updates._addCallbacks(e,t),o.updates.queue.unshift({action:t,data:e}),o.updates.filesystemCredentials.available=!1,o.updates.showErrorInCredentialsForm(e.errorMessage),o.updates.requestFilesystemCredentials()},o.updates.maybeHandleCredentialError=function(e,t){return!(!o.updates.shouldRequestFilesystemCredentials||!e.errorCode||"unable_to_connect_to_filesystem"!==e.errorCode)&&(o.updates.credentialError(e,t),!0)},o.updates.isValidResponse=function(e,t){var a,s=o.updates.l10n.unknownError;if(_.isObject(e)&&!_.isFunction(e.always))return!0;switch(_.isString(e)&&"-1"===e?s=o.updates.l10n.nonceError:_.isString(e)?s=e:void 0!==e.readyState&&0===e.readyState?s=o.updates.l10n.connectionError:_.isString(e.responseText)&&""!==e.responseText?s=e.responseText:_.isString(e.statusText)&&(s=e.statusText),t){case"update":a=o.updates.l10n.updateFailed;break;case"install":a=o.updates.l10n.installFailed;break;case"delete":a=o.updates.l10n.deleteFailed}return s=s.replace(/<[\/a-z][^<>]*>/gi,""),a=a.replace("%s",s),o.updates.addAdminNotice({id:"unknown_error",className:"notice-error is-dismissible",message:_.escape(a)}),o.updates.ajaxLocked=!1,o.updates.queue=[],r(".button.updating-message").removeClass("updating-message").removeAttr("aria-label").prop("disabled",!0).text(o.updates.l10n.updateFailedShort),r(".updating-message:not(.button):not(.thickbox)").removeClass("updating-message notice-warning").addClass("notice-error").find("p").removeAttr("aria-label").text(a),o.a11y.speak(a,"assertive"),!1},o.updates.beforeunload=function(){if(o.updates.ajaxLocked)return o.updates.l10n.beforeunload},r(function(){var l=r("#plugin-filter"),u=r("#bulk-action-form"),e=r("#request-filesystem-credentials-form"),t=r("#request-filesystem-credentials-dialog"),a=r(".plugins-php .wp-filter-search"),s=r(".plugin-install-php .wp-filter-search");(d=_.extend(d,window._wpUpdatesItemCounts||{})).totals&&o.updates.refreshCount(),o.updates.shouldRequestFilesystemCredentials=0<t.length,t.on("submit","form",function(e){e.preventDefault(),o.updates.filesystemCredentials.ftp.hostname=r("#hostname").val(),o.updates.filesystemCredentials.ftp.username=r("#username").val(),o.updates.filesystemCredentials.ftp.password=r("#password").val(),o.updates.filesystemCredentials.ftp.connectionType=r('input[name="connection_type"]:checked').val(),o.updates.filesystemCredentials.ssh.publicKey=r("#public_key").val(),o.updates.filesystemCredentials.ssh.privateKey=r("#private_key").val(),o.updates.filesystemCredentials.fsNonce=r("#_fs_nonce").val(),o.updates.filesystemCredentials.available=!0,o.updates.ajaxLocked=!1,o.updates.queueChecker(),o.updates.requestForCredentialsModalClose()}),t.on("click",'[data-js-action="close"], .notification-dialog-background',o.updates.requestForCredentialsModalCancel),e.on("change",'input[name="connection_type"]',function(){r("#ssh-keys").toggleClass("hidden","ssh"!==r(this).val())}).change(),p.on("credential-modal-cancel",function(e,t){var a,s=r(".updating-message");"import"===pagenow?s.removeClass("updating-message"):"plugins"===pagenow||"plugins-network"===pagenow?"update-plugin"===t.action?a=r('tr[data-plugin="'+t.data.plugin+'"]').find(".update-message"):"delete-plugin"===t.action&&(a=r('[data-plugin="'+t.data.plugin+'"]').find(".row-actions a.delete")):"themes"===pagenow||"themes-network"===pagenow?"update-theme"===t.action?a=r('[data-slug="'+t.data.slug+'"]').find(".update-message"):"delete-theme"===t.action&&"themes-network"===pagenow?a=r('[data-slug="'+t.data.slug+'"]').find(".row-actions a.delete"):"delete-theme"===t.action&&"themes"===pagenow&&(a=r(".theme-actions .delete-theme")):a=s,a&&a.hasClass("updating-message")&&(void 0===(s=a.data("originaltext"))&&(s=r("<p>").html(a.find("p").data("originaltext"))),a.removeClass("updating-message").html(s),"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||("update-plugin"===t.action?a.attr("aria-label",o.updates.l10n.pluginUpdateNowLabel.replace("%s",a.data("name"))):"install-plugin"===t.action&&a.attr("aria-label",o.updates.l10n.pluginInstallNowLabel.replace("%s",a.data("name"))))),o.a11y.speak(o.updates.l10n.updateCancel,"polite")}),u.on("click","[data-plugin] .update-link",function(e){var t=r(e.target),a=t.parents("tr");e.preventDefault(),t.hasClass("updating-message")||t.hasClass("button-disabled")||(o.updates.maybeRequestFilesystemCredentials(e),o.updates.$elToReturnFocusToFromCredentialsModal=a.find(".check-column input"),o.updates.updatePlugin({plugin:a.data("plugin"),slug:a.data("slug")}))}),l.on("click",".update-now",function(e){var t=r(e.target);e.preventDefault(),t.hasClass("updating-message")||t.hasClass("button-disabled")||(o.updates.maybeRequestFilesystemCredentials(e),o.updates.updatePlugin({plugin:t.data("plugin"),slug:t.data("slug")}))}),l.on("click",".install-now",function(e){var t=r(e.target);e.preventDefault(),t.hasClass("updating-message")||t.hasClass("button-disabled")||(o.updates.shouldRequestFilesystemCredentials&&!o.updates.ajaxLocked&&(o.updates.requestFilesystemCredentials(e),p.on("credential-modal-cancel",function(){r(".install-now.updating-message").removeClass("updating-message").text(o.updates.l10n.installNow),o.a11y.speak(o.updates.l10n.updateCancel,"polite")})),o.updates.installPlugin({slug:t.data("slug")}))}),p.on("click",".importer-item .install-now",function(e){var t=r(e.target),a=r(this).data("name");e.preventDefault(),t.hasClass("updating-message")||(o.updates.shouldRequestFilesystemCredentials&&!o.updates.ajaxLocked&&(o.updates.requestFilesystemCredentials(e),p.on("credential-modal-cancel",function(){t.removeClass("updating-message").text(o.updates.l10n.installNow).attr("aria-label",o.updates.l10n.pluginInstallNowLabel.replace("%s",a)),o.a11y.speak(o.updates.l10n.updateCancel,"polite")})),o.updates.installPlugin({slug:t.data("slug"),pagenow:pagenow,success:o.updates.installImporterSuccess,error:o.updates.installImporterError}))}),u.on("click","[data-plugin] a.delete",function(e){var t=r(e.target).parents("tr");e.preventDefault(),window.confirm(o.updates.l10n.aysDeleteUninstall.replace("%s",t.find(".plugin-title strong").text()))&&(o.updates.maybeRequestFilesystemCredentials(e),o.updates.deletePlugin({plugin:t.data("plugin"),slug:t.data("slug")}))}),p.on("click",".themes-php.network-admin .update-link",function(e){var t=r(e.target),a=t.parents("tr");e.preventDefault(),t.hasClass("updating-message")||t.hasClass("button-disabled")||(o.updates.maybeRequestFilesystemCredentials(e),o.updates.$elToReturnFocusToFromCredentialsModal=a.find(".check-column input"),o.updates.updateTheme({slug:a.data("slug")}))}),p.on("click",".themes-php.network-admin a.delete",function(e){var t=r(e.target).parents("tr");e.preventDefault(),window.confirm(o.updates.l10n.aysDelete.replace("%s",t.find(".theme-title strong").text()))&&(o.updates.maybeRequestFilesystemCredentials(e),o.updates.deleteTheme({slug:t.data("slug")}))}),u.on("click",'[type="submit"]:not([name="clear-recent-list"])',function(e){var t,s,n=r(e.target).siblings("select").val(),a=u.find('input[name="checked[]"]:checked'),l=0,i=0,d=[];switch(pagenow){case"plugins":case"plugins-network":t="plugin";break;case"themes-network":t="theme";break;default:return}if(!a.length)return e.preventDefault(),r("html, body").animate({scrollTop:0}),o.updates.addAdminNotice({id:"no-items-selected",className:"notice-error is-dismissible",message:o.updates.l10n.noItemsSelected});switch(n){case"update-selected":s=n.replace("selected",t);break;case"delete-selected":if(!window.confirm("plugin"===t?o.updates.l10n.aysBulkDelete:o.updates.l10n.aysBulkDeleteThemes))return void e.preventDefault();s=n.replace("selected",t);break;default:return}o.updates.maybeRequestFilesystemCredentials(e),e.preventDefault(),u.find('.manage-column [type="checkbox"]').prop("checked",!1),p.trigger("wp-"+t+"-bulk-"+n,a),a.each(function(e,t){var a=r(t),t=a.parents("tr");"update-selected"!==n||t.hasClass("update")&&!t.find("notice-error").length?o.updates.queue.push({action:s,data:{plugin:t.data("plugin"),slug:t.data("slug")}}):a.prop("checked",!1)}),p.on("wp-plugin-update-success wp-plugin-update-error wp-theme-update-success wp-theme-update-error",function(e,t){var a,s=r('[data-slug="'+t.slug+'"]');"wp-"+t.update+"-update-success"===e.type?l++:(e=t.pluginName||s.find(".column-primary strong").text(),i++,d.push(e+": "+t.errorMessage)),s.find('input[name="checked[]"]:checked').prop("checked",!1),o.updates.adminNotice=o.template("wp-bulk-updates-admin-notice"),o.updates.addAdminNotice({id:"bulk-action-notice",className:"bulk-action-notice",successes:l,errors:i,errorMessages:d,type:t.update}),a=r("#bulk-action-notice").on("click","button",function(){r(this).toggleClass("bulk-action-errors-collapsed").attr("aria-expanded",!r(this).hasClass("bulk-action-errors-collapsed")),a.find(".bulk-action-errors").toggleClass("hidden")}),0<i&&!o.updates.queue.length&&r("html, body").animate({scrollTop:0})}),p.on("wp-updates-notice-added",function(){o.updates.adminNotice=o.template("wp-updates-admin-notice")}),o.updates.queueChecker()}),s.length&&s.attr("aria-describedby","live-search-desc"),s.on("keyup input",_.debounce(function(e,t){var a=r(".plugin-install-search"),s={_ajax_nonce:o.updates.ajaxNonce,s:e.target.value,tab:"search",type:r("#typeselector").val(),pagenow:pagenow},n=location.href.split("?")[0]+"?"+r.param(_.omit(s,["_ajax_nonce","pagenow"]));"keyup"===e.type&&27===e.which&&(e.target.value=""),o.updates.searchTerm===s.s&&"typechange"!==t||(l.empty(),o.updates.searchTerm=s.s,window.history&&window.history.replaceState&&window.history.replaceState(null,"",n),a.length||(a=r('<li class="plugin-install-search" />').append(r("<a />",{class:"current",href:n,text:o.updates.l10n.searchResultsLabel})),r(".wp-filter .filter-links .current").removeClass("current").parents(".filter-links").prepend(a),l.prev("p").remove(),r(".plugins-popular-tags-wrapper").remove()),void 0!==o.updates.searchRequest&&o.updates.searchRequest.abort(),r("body").addClass("loading-content"),o.updates.searchRequest=o.ajax.post("search-install-plugins",s).done(function(e){r("body").removeClass("loading-content"),l.append(e.items),delete o.updates.searchRequest,0===e.count?o.a11y.speak(o.updates.l10n.noPluginsFound):o.a11y.speak(o.updates.l10n.pluginsFound.replace("%d",e.count))}))},500)),a.length&&a.attr("aria-describedby","live-search-desc"),a.on("keyup input",_.debounce(function(e){var s={_ajax_nonce:o.updates.ajaxNonce,s:e.target.value,pagenow:pagenow,plugin_status:"all"};"keyup"===e.type&&27===e.which&&(e.target.value=""),o.updates.searchTerm!==s.s&&(o.updates.searchTerm=s.s,e=_.object(_.compact(_.map(location.search.slice(1).split("&"),function(e){if(e)return e.split("=")}))),s.plugin_status=e.plugin_status||"all",window.history&&window.history.replaceState&&window.history.replaceState(null,"",location.href.split("?")[0]+"?s="+s.s+"&plugin_status="+s.plugin_status),void 0!==o.updates.searchRequest&&o.updates.searchRequest.abort(),u.empty(),r("body").addClass("loading-content"),r(".subsubsub .current").removeClass("current"),o.updates.searchRequest=o.ajax.post("search-plugins",s).done(function(e){var t=r("<span />").addClass("subtitle").html(o.updates.l10n.searchResults.replace("%s",_.escape(s.s))),a=r(".wrap .subtitle");s.s.length?a.length?a.replaceWith(t):r(".wp-header-end").before(t):(a.remove(),r(".subsubsub ."+s.plugin_status+" a").addClass("current")),r("body").removeClass("loading-content"),u.append(e.items),delete o.updates.searchRequest,0===e.count?o.a11y.speak(o.updates.l10n.noPluginsFound):o.a11y.speak(o.updates.l10n.pluginsFound.replace("%d",e.count))}))},500)),p.on("submit",".search-plugins",function(e){e.preventDefault(),r("input.wp-filter-search").trigger("input")}),p.on("click",".try-again",function(e){e.preventDefault(),s.trigger("input")}),r("#typeselector").on("change",function(){var e=r('input[name="s"]');e.val().length&&e.trigger("input","typechange")}),r("#plugin_update_from_iframe").on("click",function(e){var t=window.parent===window?null:window.parent;r.support.postMessage=!!window.postMessage,!1!==r.support.postMessage&&null!==t&&-1===window.parent.location.pathname.indexOf("update-core.php")&&(e.preventDefault(),e={action:"update-plugin",data:{plugin:r(this).data("plugin"),slug:r(this).data("slug")}},t.postMessage(JSON.stringify(e),window.location.origin))}),r("#plugin_install_from_iframe").on("click",function(e){var t=window.parent===window?null:window.parent;r.support.postMessage=!!window.postMessage,!1!==r.support.postMessage&&null!==t&&-1===window.parent.location.pathname.indexOf("index.php")&&(e.preventDefault(),e={action:"install-plugin",data:{slug:r(this).data("slug")}},t.postMessage(JSON.stringify(e),window.location.origin))}),r(window).on("message",function(e){var t,a=e.originalEvent,e=document.location.protocol+"//"+document.location.hostname;if(a.origin===e){try{t=r.parseJSON(a.data)}catch(e){return}if(t&&void 0!==t.action)switch(t.action){case"decrementUpdateCount":o.updates.decrementCount(t.upgradeType);break;case"install-plugin":case"update-plugin":window.tb_remove(),t.data=o.updates._addCallbacks(t.data,t.action),o.updates.queue.push(t),o.updates.queueChecker()}}}),r(window).on("beforeunload",o.updates.beforeunload)})}(jQuery,window.wp,window._wpUpdatesSettings);home/xbodynamge/lebauwcentre/wp-admin/js/updates.min.js000064400000105455151124714010017234 0ustar00!function(r,o,d){var p=r(document);(o=o||{}).updates={},o.updates.ajaxNonce=d.ajax_nonce,o.updates.l10n=d.l10n,o.updates.searchTerm="",o.updates.shouldRequestFilesystemCredentials=!1,o.updates.filesystemCredentials={ftp:{host:"",username:"",password:"",connectionType:""},ssh:{publicKey:"",privateKey:""},fsNonce:"",available:!1},o.updates.ajaxLocked=!1,o.updates.adminNotice=o.template("wp-updates-admin-notice"),o.updates.queue=[],o.updates.$elToReturnFocusToFromCredentialsModal=void 0,o.updates.addAdminNotice=function(e){var t,a=r(e.selector),s=r(".wp-header-end");delete e.selector,t=o.updates.adminNotice(e),(a=!a.length?r("#"+e.id):a).length?a.replaceWith(t):s.length?s.after(t):"customize"===pagenow?r(".customize-themes-notifications").append(t):r(".wrap").find("> h1").after(t),p.trigger("wp-updates-notice-added")},o.updates.ajax=function(e,t){var a={};return o.updates.ajaxLocked?(o.updates.queue.push({action:e,data:t}),r.Deferred()):(o.updates.ajaxLocked=!0,t.success&&(a.success=t.success,delete t.success),t.error&&(a.error=t.error,delete t.error),a.data=_.extend(t,{action:e,_ajax_nonce:o.updates.ajaxNonce,_fs_nonce:o.updates.filesystemCredentials.fsNonce,username:o.updates.filesystemCredentials.ftp.username,password:o.updates.filesystemCredentials.ftp.password,hostname:o.updates.filesystemCredentials.ftp.hostname,connection_type:o.updates.filesystemCredentials.ftp.connectionType,public_key:o.updates.filesystemCredentials.ssh.publicKey,private_key:o.updates.filesystemCredentials.ssh.privateKey}),o.ajax.send(a).always(o.updates.ajaxAlways))},o.updates.ajaxAlways=function(e){e.errorCode&&"unable_to_connect_to_filesystem"===e.errorCode||(o.updates.ajaxLocked=!1,o.updates.queueChecker()),void 0!==e.debug&&window.console&&window.console.log&&_.map(e.debug,function(e){window.console.log(o.sanitize.stripTagsAndEncodeText(e))})},o.updates.refreshCount=function(){var e,t=r("#wp-admin-bar-updates"),a=r('a[href="update-core.php"] .update-plugins'),s=r('a[href="plugins.php"] .update-plugins'),n=r('a[href="themes.php"] .update-plugins');t.find(".ab-item").removeAttr("title"),t.find(".ab-label").text(d.totals.counts.total),0===d.totals.counts.total&&t.find(".ab-label").parents("li").remove(),a.each(function(e,t){t.className=t.className.replace(/count-\d+/,"count-"+d.totals.counts.total)}),0<d.totals.counts.total?a.find(".update-count").text(d.totals.counts.total):a.remove(),s.each(function(e,t){t.className=t.className.replace(/count-\d+/,"count-"+d.totals.counts.plugins)}),0<d.totals.counts.total?s.find(".plugin-count").text(d.totals.counts.plugins):s.remove(),n.each(function(e,t){t.className=t.className.replace(/count-\d+/,"count-"+d.totals.counts.themes)}),0<d.totals.counts.total?n.find(".theme-count").text(d.totals.counts.themes):n.remove(),"plugins"===pagenow||"plugins-network"===pagenow?e=d.totals.counts.plugins:"themes"!==pagenow&&"themes-network"!==pagenow||(e=d.totals.counts.themes),0<e?r(".subsubsub .upgrade .count").text("("+e+")"):(r(".subsubsub .upgrade").remove(),r(".subsubsub li:last").html(function(){return r(this).children()}))},o.updates.decrementCount=function(e){d.totals.counts.total=Math.max(--d.totals.counts.total,0),"plugin"===e?d.totals.counts.plugins=Math.max(--d.totals.counts.plugins,0):"theme"===e&&(d.totals.counts.themes=Math.max(--d.totals.counts.themes,0)),o.updates.refreshCount(e)},o.updates.updatePlugin=function(e){var t,a,s;return e=_.extend({success:o.updates.updatePluginSuccess,error:o.updates.updatePluginError},e),"plugins"===pagenow||"plugins-network"===pagenow?(a=(t=r('tr[data-plugin="'+e.plugin+'"]')).find(".update-message").removeClass("notice-error").addClass("updating-message notice-warning").find("p"),s=o.updates.l10n.pluginUpdatingLabel.replace("%s",t.find(".plugin-title strong").text())):"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||(a=(t=r(".plugin-card-"+e.slug)).find(".update-now").addClass("updating-message"),s=o.updates.l10n.pluginUpdatingLabel.replace("%s",a.data("name")),t.removeClass("plugin-card-update-failed").find(".notice.notice-error").remove()),a.html()!==o.updates.l10n.updating&&a.data("originaltext",a.html()),a.attr("aria-label",s).text(o.updates.l10n.updating),p.trigger("wp-plugin-updating",e),o.updates.ajax("update-plugin",e)},o.updates.updatePluginSuccess=function(e){var t,a,s;"plugins"===pagenow||"plugins-network"===pagenow?(a=(t=r('tr[data-plugin="'+e.plugin+'"]').removeClass("update").addClass("updated")).find(".update-message").removeClass("updating-message notice-warning").addClass("updated-message notice-success").find("p"),s=t.find(".plugin-version-author-uri").html().replace(e.oldVersion,e.newVersion),t.find(".plugin-version-author-uri").html(s)):"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||(a=r(".plugin-card-"+e.slug).find(".update-now").removeClass("updating-message").addClass("button-disabled updated-message")),a.attr("aria-label",o.updates.l10n.pluginUpdatedLabel.replace("%s",e.pluginName)).text(o.updates.l10n.pluginUpdated),o.a11y.speak(o.updates.l10n.updatedMsg,"polite"),o.updates.decrementCount("plugin"),p.trigger("wp-plugin-update-success",e)},o.updates.updatePluginError=function(e){var t,a,s;o.updates.isValidResponse(e,"update")&&(o.updates.maybeHandleCredentialError(e,"update-plugin")||(s=o.updates.l10n.updateFailed.replace("%s",e.errorMessage),"plugins"===pagenow||"plugins-network"===pagenow?((a=(e.plugin?r('tr[data-plugin="'+e.plugin+'"]'):r('tr[data-slug="'+e.slug+'"]')).find(".update-message")).removeClass("updating-message notice-warning").addClass("notice-error").find("p").html(s),e.pluginName?a.find("p").attr("aria-label",o.updates.l10n.pluginUpdateFailedLabel.replace("%s",e.pluginName)):a.find("p").removeAttr("aria-label")):"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||((t=r(".plugin-card-"+e.slug).addClass("plugin-card-update-failed").append(o.updates.adminNotice({className:"update-message notice-error notice-alt is-dismissible",message:s}))).find(".update-now").text(o.updates.l10n.updateFailedShort).removeClass("updating-message"),e.pluginName?t.find(".update-now").attr("aria-label",o.updates.l10n.pluginUpdateFailedLabel.replace("%s",e.pluginName)):t.find(".update-now").removeAttr("aria-label"),t.on("click",".notice.is-dismissible .notice-dismiss",function(){setTimeout(function(){t.removeClass("plugin-card-update-failed").find(".column-name a").focus(),t.find(".update-now").attr("aria-label",!1).text(o.updates.l10n.updateNow)},200)})),o.a11y.speak(s,"assertive"),p.trigger("wp-plugin-update-error",e)))},o.updates.installPlugin=function(e){var t=r(".plugin-card-"+e.slug),a=t.find(".install-now");return e=_.extend({success:o.updates.installPluginSuccess,error:o.updates.installPluginError},e),(a="import"===pagenow?r('[data-slug="'+e.slug+'"]'):a).html()!==o.updates.l10n.installing&&a.data("originaltext",a.html()),a.addClass("updating-message").attr("aria-label",o.updates.l10n.pluginInstallingLabel.replace("%s",a.data("name"))).text(o.updates.l10n.installing),o.a11y.speak(o.updates.l10n.installingMsg,"polite"),t.removeClass("plugin-card-install-failed").find(".notice.notice-error").remove(),p.trigger("wp-plugin-installing",e),o.updates.ajax("install-plugin",e)},o.updates.installPluginSuccess=function(e){var t=r(".plugin-card-"+e.slug).find(".install-now");t.removeClass("updating-message").addClass("updated-message installed button-disabled").attr("aria-label",o.updates.l10n.pluginInstalledLabel.replace("%s",e.pluginName)).text(o.updates.l10n.pluginInstalled),o.a11y.speak(o.updates.l10n.installedMsg,"polite"),p.trigger("wp-plugin-install-success",e),e.activateUrl&&setTimeout(function(){t.removeClass("install-now installed button-disabled updated-message").addClass("activate-now button-primary").attr("href",e.activateUrl).attr("aria-label",o.updates.l10n.activatePluginLabel.replace("%s",e.pluginName)).text(o.updates.l10n.activatePlugin)},1e3)},o.updates.installPluginError=function(e){var t,a=r(".plugin-card-"+e.slug),s=a.find(".install-now");o.updates.isValidResponse(e,"install")&&(o.updates.maybeHandleCredentialError(e,"install-plugin")||(t=o.updates.l10n.installFailed.replace("%s",e.errorMessage),a.addClass("plugin-card-update-failed").append('<div class="notice notice-error notice-alt is-dismissible"><p>'+t+"</p></div>"),a.on("click",".notice.is-dismissible .notice-dismiss",function(){setTimeout(function(){a.removeClass("plugin-card-update-failed").find(".column-name a").focus()},200)}),s.removeClass("updating-message").addClass("button-disabled").attr("aria-label",o.updates.l10n.pluginInstallFailedLabel.replace("%s",s.data("name"))).text(o.updates.l10n.installFailedShort),o.a11y.speak(t,"assertive"),p.trigger("wp-plugin-install-error",e)))},o.updates.installImporterSuccess=function(e){o.updates.addAdminNotice({id:"install-success",className:"notice-success is-dismissible",message:o.updates.l10n.importerInstalledMsg.replace("%s",e.activateUrl+"&from=import")}),r('[data-slug="'+e.slug+'"]').removeClass("install-now updating-message").addClass("activate-now").attr({href:e.activateUrl+"&from=import","aria-label":o.updates.l10n.activateImporterLabel.replace("%s",e.pluginName)}).text(o.updates.l10n.activateImporter),o.a11y.speak(o.updates.l10n.installedMsg,"polite"),p.trigger("wp-importer-install-success",e)},o.updates.installImporterError=function(e){var t=o.updates.l10n.installFailed.replace("%s",e.errorMessage),a=r('[data-slug="'+e.slug+'"]'),s=a.data("name");o.updates.isValidResponse(e,"install")&&(o.updates.maybeHandleCredentialError(e,"install-plugin")||(o.updates.addAdminNotice({id:e.errorCode,className:"notice-error is-dismissible",message:t}),a.removeClass("updating-message").text(o.updates.l10n.installNow).attr("aria-label",o.updates.l10n.pluginInstallNowLabel.replace("%s",s)),o.a11y.speak(t,"assertive"),p.trigger("wp-importer-install-error",e)))},o.updates.deletePlugin=function(e){var t=r('[data-plugin="'+e.plugin+'"]').find(".row-actions a.delete");return e=_.extend({success:o.updates.deletePluginSuccess,error:o.updates.deletePluginError},e),t.html()!==o.updates.l10n.deleting&&t.data("originaltext",t.html()).text(o.updates.l10n.deleting),o.a11y.speak(o.updates.l10n.deleting,"polite"),p.trigger("wp-plugin-deleting",e),o.updates.ajax("delete-plugin",e)},o.updates.deletePluginSuccess=function(i){r('[data-plugin="'+i.plugin+'"]').css({backgroundColor:"#faafaa"}).fadeOut(350,function(){var e=r("#bulk-action-form"),t=r(".subsubsub"),a=r(this),s=e.find("thead th:not(.hidden), thead td").length,n=o.template("item-deleted-row"),l=d.plugins;a.hasClass("plugin-update-tr")||a.after(n({slug:i.slug,plugin:i.plugin,colspan:s,name:i.pluginName})),a.remove(),-1!==_.indexOf(l.upgrade,i.plugin)&&(l.upgrade=_.without(l.upgrade,i.plugin),o.updates.decrementCount("plugin")),-1!==_.indexOf(l.inactive,i.plugin)&&(l.inactive=_.without(l.inactive,i.plugin),l.inactive.length?t.find(".inactive .count").text("("+l.inactive.length+")"):t.find(".inactive").remove()),-1!==_.indexOf(l.active,i.plugin)&&(l.active=_.without(l.active,i.plugin),l.active.length?t.find(".active .count").text("("+l.active.length+")"):t.find(".active").remove()),-1!==_.indexOf(l.recently_activated,i.plugin)&&(l.recently_activated=_.without(l.recently_activated,i.plugin),l.recently_activated.length?t.find(".recently_activated .count").text("("+l.recently_activated.length+")"):t.find(".recently_activated").remove()),l.all=_.without(l.all,i.plugin),l.all.length?t.find(".all .count").text("("+l.all.length+")"):(e.find(".tablenav").css({visibility:"hidden"}),t.find(".all").remove(),e.find("tr.no-items").length||e.find("#the-list").append('<tr class="no-items"><td class="colspanchange" colspan="'+s+'">'+o.updates.l10n.noPlugins+"</td></tr>"))}),o.a11y.speak(o.updates.l10n.pluginDeleted,"polite"),p.trigger("wp-plugin-delete-success",i)},o.updates.deletePluginError=function(e){var t,a=o.template("item-update-row"),s=o.updates.adminNotice({className:"update-message notice-error notice-alt",message:e.errorMessage}),n=e.plugin?(t=r('tr.inactive[data-plugin="'+e.plugin+'"]')).siblings('[data-plugin="'+e.plugin+'"]'):(t=r('tr.inactive[data-slug="'+e.slug+'"]')).siblings('[data-slug="'+e.slug+'"]');o.updates.isValidResponse(e,"delete")&&(o.updates.maybeHandleCredentialError(e,"delete-plugin")||(n.length?(n.find(".notice-error").remove(),n.find(".plugin-update").append(s)):t.addClass("update").after(a({slug:e.slug,plugin:e.plugin||e.slug,colspan:r("#bulk-action-form").find("thead th:not(.hidden), thead td").length,content:s})),p.trigger("wp-plugin-delete-error",e)))},o.updates.updateTheme=function(e){var t;return e=_.extend({success:o.updates.updateThemeSuccess,error:o.updates.updateThemeError},e),(t="themes-network"===pagenow?r('[data-slug="'+e.slug+'"]').find(".update-message").removeClass("notice-error").addClass("updating-message notice-warning").find("p"):"customize"===pagenow?((t=r('[data-slug="'+e.slug+'"].notice').removeClass("notice-large")).find("h3").remove(),(t=t.add(r("#customize-control-installed_theme_"+e.slug).find(".update-message"))).addClass("updating-message").find("p")):((t=r("#update-theme").closest(".notice").removeClass("notice-large")).find("h3").remove(),(t=t.add(r('[data-slug="'+e.slug+'"]').find(".update-message"))).addClass("updating-message").find("p"))).html()!==o.updates.l10n.updating&&t.data("originaltext",t.html()),o.a11y.speak(o.updates.l10n.updatingMsg,"polite"),t.text(o.updates.l10n.updating),p.trigger("wp-theme-updating",e),o.updates.ajax("update-theme",e)},o.updates.updateThemeSuccess=function(e){var t,a,s=r("body.modal-open").length,n=r('[data-slug="'+e.slug+'"]'),l={className:"updated-message notice-success notice-alt",message:o.updates.l10n.themeUpdated};"customize"===pagenow?((n=r(".updating-message").siblings(".theme-name")).length&&(a=n.html().replace(e.oldVersion,e.newVersion),n.html(a)),t=r(".theme-info .notice").add(o.customize.control("installed_theme_"+e.slug).container.find(".theme").find(".update-message"))):"themes-network"===pagenow?(t=n.find(".update-message"),a=n.find(".theme-version-author-uri").html().replace(e.oldVersion,e.newVersion),n.find(".theme-version-author-uri").html(a)):(t=r(".theme-info .notice").add(n.find(".update-message")),(s?r(".load-customize:visible"):n.find(".load-customize")).focus()),o.updates.addAdminNotice(_.extend({selector:t},l)),o.a11y.speak(o.updates.l10n.updatedMsg,"polite"),o.updates.decrementCount("theme"),p.trigger("wp-theme-update-success",e),s&&"customize"!==pagenow&&r(".theme-info .theme-author").after(o.updates.adminNotice(l))},o.updates.updateThemeError=function(e){var t,a=r('[data-slug="'+e.slug+'"]'),s=o.updates.l10n.updateFailed.replace("%s",e.errorMessage);o.updates.isValidResponse(e,"update")&&(o.updates.maybeHandleCredentialError(e,"update-theme")||("customize"===pagenow&&(a=o.customize.control("installed_theme_"+e.slug).container.find(".theme")),"themes-network"===pagenow?t=a.find(".update-message "):(t=r(".theme-info .notice").add(a.find(".notice")),(r("body.modal-open").length?r(".load-customize:visible"):a.find(".load-customize")).focus()),o.updates.addAdminNotice({selector:t,className:"update-message notice-error notice-alt is-dismissible",message:s}),o.a11y.speak(s,"polite"),p.trigger("wp-theme-update-error",e)))},o.updates.installTheme=function(e){var t=r('.theme-install[data-slug="'+e.slug+'"]');return e=_.extend({success:o.updates.installThemeSuccess,error:o.updates.installThemeError},e),t.addClass("updating-message"),t.parents(".theme").addClass("focus"),t.html()!==o.updates.l10n.installing&&t.data("originaltext",t.html()),t.text(o.updates.l10n.installing).attr("aria-label",o.updates.l10n.themeInstallingLabel.replace("%s",t.data("name"))),o.a11y.speak(o.updates.l10n.installingMsg,"polite"),r('.install-theme-info, [data-slug="'+e.slug+'"]').removeClass("theme-install-failed").find(".notice.notice-error").remove(),p.trigger("wp-theme-installing",e),o.updates.ajax("install-theme",e)},o.updates.installThemeSuccess=function(e){var t,a=r(".wp-full-overlay-header, [data-slug="+e.slug+"]");p.trigger("wp-theme-install-success",e),t=a.find(".button-primary").removeClass("updating-message").addClass("updated-message disabled").attr("aria-label",o.updates.l10n.themeInstalledLabel.replace("%s",e.themeName)).text(o.updates.l10n.themeInstalled),o.a11y.speak(o.updates.l10n.installedMsg,"polite"),setTimeout(function(){e.activateUrl&&t.attr("href",e.activateUrl).removeClass("theme-install updated-message disabled").addClass("activate").attr("aria-label",o.updates.l10n.activateThemeLabel.replace("%s",e.themeName)).text(o.updates.l10n.activateTheme),e.customizeUrl&&t.siblings(".preview").replaceWith(function(){return r("<a>").attr("href",e.customizeUrl).addClass("button load-customize").text(o.updates.l10n.livePreview)})},1e3)},o.updates.installThemeError=function(e){var t,a=o.updates.l10n.installFailed.replace("%s",e.errorMessage),s=o.updates.adminNotice({className:"update-message notice-error notice-alt",message:a});o.updates.isValidResponse(e,"install")&&(o.updates.maybeHandleCredentialError(e,"install-theme")||("customize"===pagenow?(p.find("body").hasClass("modal-open")?(t=r('.theme-install[data-slug="'+e.slug+'"]'),r(".theme-overlay .theme-info").prepend(s)):(t=r('.theme-install[data-slug="'+e.slug+'"]')).closest(".theme").addClass("theme-install-failed").append(s),o.customize.notifications.remove("theme_installing")):p.find("body").hasClass("full-overlay-active")?(t=r('.theme-install[data-slug="'+e.slug+'"]'),r(".install-theme-info").prepend(s)):t=r('[data-slug="'+e.slug+'"]').removeClass("focus").addClass("theme-install-failed").append(s).find(".theme-install"),t.removeClass("updating-message").attr("aria-label",o.updates.l10n.themeInstallFailedLabel.replace("%s",t.data("name"))).text(o.updates.l10n.installFailedShort),o.a11y.speak(a,"assertive"),p.trigger("wp-theme-install-error",e)))},o.updates.deleteTheme=function(e){var t;return"themes"===pagenow?t=r(".theme-actions .delete-theme"):"themes-network"===pagenow&&(t=r('[data-slug="'+e.slug+'"]').find(".row-actions a.delete")),e=_.extend({success:o.updates.deleteThemeSuccess,error:o.updates.deleteThemeError},e),t&&t.html()!==o.updates.l10n.deleting&&t.data("originaltext",t.html()).text(o.updates.l10n.deleting),o.a11y.speak(o.updates.l10n.deleting,"polite"),r(".theme-info .update-message").remove(),p.trigger("wp-theme-deleting",e),o.updates.ajax("delete-theme",e)},o.updates.deleteThemeSuccess=function(n){var e=r('[data-slug="'+n.slug+'"]');"themes-network"===pagenow&&e.css({backgroundColor:"#faafaa"}).fadeOut(350,function(){var e=r(".subsubsub"),t=r(this),a=d.themes,s=o.template("item-deleted-row");t.hasClass("plugin-update-tr")||t.after(s({slug:n.slug,colspan:r("#bulk-action-form").find("thead th:not(.hidden), thead td").length,name:t.find(".theme-title strong").text()})),t.remove(),t.hasClass("update")&&(a.upgrade--,o.updates.decrementCount("theme")),t.hasClass("inactive")&&(a.disabled--,a.disabled?e.find(".disabled .count").text("("+a.disabled+")"):e.find(".disabled").remove()),e.find(".all .count").text("("+--a.all+")")}),o.a11y.speak(o.updates.l10n.themeDeleted,"polite"),p.trigger("wp-theme-delete-success",n)},o.updates.deleteThemeError=function(e){var t=r('tr.inactive[data-slug="'+e.slug+'"]'),a=r(".theme-actions .delete-theme"),s=o.template("item-update-row"),n=t.siblings("#"+e.slug+"-update"),l=o.updates.l10n.deleteFailed.replace("%s",e.errorMessage),i=o.updates.adminNotice({className:"update-message notice-error notice-alt",message:l});o.updates.maybeHandleCredentialError(e,"delete-theme")||("themes-network"===pagenow?n.length?(n.find(".notice-error").remove(),n.find(".plugin-update").append(i)):t.addClass("update").after(s({slug:e.slug,colspan:r("#bulk-action-form").find("thead th:not(.hidden), thead td").length,content:i})):r(".theme-info .theme-description").before(i),a.html(a.data("originaltext")),o.a11y.speak(l,"assertive"),p.trigger("wp-theme-delete-error",e))},o.updates._addCallbacks=function(e,t){return"import"===pagenow&&"install-plugin"===t&&(e.success=o.updates.installImporterSuccess,e.error=o.updates.installImporterError),e},o.updates.queueChecker=function(){var e;if(!o.updates.ajaxLocked&&o.updates.queue.length)switch((e=o.updates.queue.shift()).action){case"install-plugin":o.updates.installPlugin(e.data);break;case"update-plugin":o.updates.updatePlugin(e.data);break;case"delete-plugin":o.updates.deletePlugin(e.data);break;case"install-theme":o.updates.installTheme(e.data);break;case"update-theme":o.updates.updateTheme(e.data);break;case"delete-theme":o.updates.deleteTheme(e.data)}},o.updates.requestFilesystemCredentials=function(e){!1===o.updates.filesystemCredentials.available&&(e&&!o.updates.$elToReturnFocusToFromCredentialsModal&&(o.updates.$elToReturnFocusToFromCredentialsModal=r(e.target)),o.updates.ajaxLocked=!0,o.updates.requestForCredentialsModalOpen())},o.updates.maybeRequestFilesystemCredentials=function(e){o.updates.shouldRequestFilesystemCredentials&&!o.updates.ajaxLocked&&o.updates.requestFilesystemCredentials(e)},o.updates.keydown=function(e){27===e.keyCode?o.updates.requestForCredentialsModalCancel():9===e.keyCode&&("upgrade"!==e.target.id||e.shiftKey?"hostname"===e.target.id&&e.shiftKey&&(r("#upgrade").focus(),e.preventDefault()):(r("#hostname").focus(),e.preventDefault()))},o.updates.requestForCredentialsModalOpen=function(){var e=r("#request-filesystem-credentials-dialog");r("body").addClass("modal-open"),e.show(),e.find("input:enabled:first").focus(),e.on("keydown",o.updates.keydown)},o.updates.requestForCredentialsModalClose=function(){r("#request-filesystem-credentials-dialog").hide(),r("body").removeClass("modal-open"),o.updates.$elToReturnFocusToFromCredentialsModal&&o.updates.$elToReturnFocusToFromCredentialsModal.focus()},o.updates.requestForCredentialsModalCancel=function(){(o.updates.ajaxLocked||o.updates.queue.length)&&(_.each(o.updates.queue,function(e){p.trigger("credential-modal-cancel",e)}),o.updates.ajaxLocked=!1,o.updates.queue=[],o.updates.requestForCredentialsModalClose())},o.updates.showErrorInCredentialsForm=function(e){var t=r("#request-filesystem-credentials-form");t.find(".notice").remove(),t.find("#request-filesystem-credentials-title").after('<div class="notice notice-alt notice-error"><p>'+e+"</p></div>")},o.updates.credentialError=function(e,t){e=o.updates._addCallbacks(e,t),o.updates.queue.unshift({action:t,data:e}),o.updates.filesystemCredentials.available=!1,o.updates.showErrorInCredentialsForm(e.errorMessage),o.updates.requestFilesystemCredentials()},o.updates.maybeHandleCredentialError=function(e,t){return!(!o.updates.shouldRequestFilesystemCredentials||!e.errorCode||"unable_to_connect_to_filesystem"!==e.errorCode)&&(o.updates.credentialError(e,t),!0)},o.updates.isValidResponse=function(e,t){var a,s=o.updates.l10n.unknownError;if(_.isObject(e)&&!_.isFunction(e.always))return!0;switch(_.isString(e)&&"-1"===e?s=o.updates.l10n.nonceError:_.isString(e)?s=e:void 0!==e.readyState&&0===e.readyState?s=o.updates.l10n.connectionError:_.isString(e.responseText)&&""!==e.responseText?s=e.responseText:_.isString(e.statusText)&&(s=e.statusText),t){case"update":a=o.updates.l10n.updateFailed;break;case"install":a=o.updates.l10n.installFailed;break;case"delete":a=o.updates.l10n.deleteFailed}return s=s.replace(/<[\/a-z][^<>]*>/gi,""),a=a.replace("%s",s),o.updates.addAdminNotice({id:"unknown_error",className:"notice-error is-dismissible",message:_.escape(a)}),o.updates.ajaxLocked=!1,o.updates.queue=[],r(".button.updating-message").removeClass("updating-message").removeAttr("aria-label").prop("disabled",!0).text(o.updates.l10n.updateFailedShort),r(".updating-message:not(.button):not(.thickbox)").removeClass("updating-message notice-warning").addClass("notice-error").find("p").removeAttr("aria-label").text(a),o.a11y.speak(a,"assertive"),!1},o.updates.beforeunload=function(){if(o.updates.ajaxLocked)return o.updates.l10n.beforeunload},r(function(){var l=r("#plugin-filter"),u=r("#bulk-action-form"),e=r("#request-filesystem-credentials-form"),t=r("#request-filesystem-credentials-dialog"),a=r(".plugins-php .wp-filter-search"),s=r(".plugin-install-php .wp-filter-search");(d=_.extend(d,window._wpUpdatesItemCounts||{})).totals&&o.updates.refreshCount(),o.updates.shouldRequestFilesystemCredentials=0<t.length,t.on("submit","form",function(e){e.preventDefault(),o.updates.filesystemCredentials.ftp.hostname=r("#hostname").val(),o.updates.filesystemCredentials.ftp.username=r("#username").val(),o.updates.filesystemCredentials.ftp.password=r("#password").val(),o.updates.filesystemCredentials.ftp.connectionType=r('input[name="connection_type"]:checked').val(),o.updates.filesystemCredentials.ssh.publicKey=r("#public_key").val(),o.updates.filesystemCredentials.ssh.privateKey=r("#private_key").val(),o.updates.filesystemCredentials.fsNonce=r("#_fs_nonce").val(),o.updates.filesystemCredentials.available=!0,o.updates.ajaxLocked=!1,o.updates.queueChecker(),o.updates.requestForCredentialsModalClose()}),t.on("click",'[data-js-action="close"], .notification-dialog-background',o.updates.requestForCredentialsModalCancel),e.on("change",'input[name="connection_type"]',function(){r("#ssh-keys").toggleClass("hidden","ssh"!==r(this).val())}).change(),p.on("credential-modal-cancel",function(e,t){var a,s=r(".updating-message");"import"===pagenow?s.removeClass("updating-message"):"plugins"===pagenow||"plugins-network"===pagenow?"update-plugin"===t.action?a=r('tr[data-plugin="'+t.data.plugin+'"]').find(".update-message"):"delete-plugin"===t.action&&(a=r('[data-plugin="'+t.data.plugin+'"]').find(".row-actions a.delete")):"themes"===pagenow||"themes-network"===pagenow?"update-theme"===t.action?a=r('[data-slug="'+t.data.slug+'"]').find(".update-message"):"delete-theme"===t.action&&"themes-network"===pagenow?a=r('[data-slug="'+t.data.slug+'"]').find(".row-actions a.delete"):"delete-theme"===t.action&&"themes"===pagenow&&(a=r(".theme-actions .delete-theme")):a=s,a&&a.hasClass("updating-message")&&(void 0===(s=a.data("originaltext"))&&(s=r("<p>").html(a.find("p").data("originaltext"))),a.removeClass("updating-message").html(s),"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||("update-plugin"===t.action?a.attr("aria-label",o.updates.l10n.pluginUpdateNowLabel.replace("%s",a.data("name"))):"install-plugin"===t.action&&a.attr("aria-label",o.updates.l10n.pluginInstallNowLabel.replace("%s",a.data("name"))))),o.a11y.speak(o.updates.l10n.updateCancel,"polite")}),u.on("click","[data-plugin] .update-link",function(e){var t=r(e.target),a=t.parents("tr");e.preventDefault(),t.hasClass("updating-message")||t.hasClass("button-disabled")||(o.updates.maybeRequestFilesystemCredentials(e),o.updates.$elToReturnFocusToFromCredentialsModal=a.find(".check-column input"),o.updates.updatePlugin({plugin:a.data("plugin"),slug:a.data("slug")}))}),l.on("click",".update-now",function(e){var t=r(e.target);e.preventDefault(),t.hasClass("updating-message")||t.hasClass("button-disabled")||(o.updates.maybeRequestFilesystemCredentials(e),o.updates.updatePlugin({plugin:t.data("plugin"),slug:t.data("slug")}))}),l.on("click",".install-now",function(e){var t=r(e.target);e.preventDefault(),t.hasClass("updating-message")||t.hasClass("button-disabled")||(o.updates.shouldRequestFilesystemCredentials&&!o.updates.ajaxLocked&&(o.updates.requestFilesystemCredentials(e),p.on("credential-modal-cancel",function(){r(".install-now.updating-message").removeClass("updating-message").text(o.updates.l10n.installNow),o.a11y.speak(o.updates.l10n.updateCancel,"polite")})),o.updates.installPlugin({slug:t.data("slug")}))}),p.on("click",".importer-item .install-now",function(e){var t=r(e.target),a=r(this).data("name");e.preventDefault(),t.hasClass("updating-message")||(o.updates.shouldRequestFilesystemCredentials&&!o.updates.ajaxLocked&&(o.updates.requestFilesystemCredentials(e),p.on("credential-modal-cancel",function(){t.removeClass("updating-message").text(o.updates.l10n.installNow).attr("aria-label",o.updates.l10n.pluginInstallNowLabel.replace("%s",a)),o.a11y.speak(o.updates.l10n.updateCancel,"polite")})),o.updates.installPlugin({slug:t.data("slug"),pagenow:pagenow,success:o.updates.installImporterSuccess,error:o.updates.installImporterError}))}),u.on("click","[data-plugin] a.delete",function(e){var t=r(e.target).parents("tr");e.preventDefault(),window.confirm(o.updates.l10n.aysDeleteUninstall.replace("%s",t.find(".plugin-title strong").text()))&&(o.updates.maybeRequestFilesystemCredentials(e),o.updates.deletePlugin({plugin:t.data("plugin"),slug:t.data("slug")}))}),p.on("click",".themes-php.network-admin .update-link",function(e){var t=r(e.target),a=t.parents("tr");e.preventDefault(),t.hasClass("updating-message")||t.hasClass("button-disabled")||(o.updates.maybeRequestFilesystemCredentials(e),o.updates.$elToReturnFocusToFromCredentialsModal=a.find(".check-column input"),o.updates.updateTheme({slug:a.data("slug")}))}),p.on("click",".themes-php.network-admin a.delete",function(e){var t=r(e.target).parents("tr");e.preventDefault(),window.confirm(o.updates.l10n.aysDelete.replace("%s",t.find(".theme-title strong").text()))&&(o.updates.maybeRequestFilesystemCredentials(e),o.updates.deleteTheme({slug:t.data("slug")}))}),u.on("click",'[type="submit"]:not([name="clear-recent-list"])',function(e){var t,s,n=r(e.target).siblings("select").val(),a=u.find('input[name="checked[]"]:checked'),l=0,i=0,d=[];switch(pagenow){case"plugins":case"plugins-network":t="plugin";break;case"themes-network":t="theme";break;default:return}if(!a.length)return e.preventDefault(),r("html, body").animate({scrollTop:0}),o.updates.addAdminNotice({id:"no-items-selected",className:"notice-error is-dismissible",message:o.updates.l10n.noItemsSelected});switch(n){case"update-selected":s=n.replace("selected",t);break;case"delete-selected":if(!window.confirm("plugin"===t?o.updates.l10n.aysBulkDelete:o.updates.l10n.aysBulkDeleteThemes))return void e.preventDefault();s=n.replace("selected",t);break;default:return}o.updates.maybeRequestFilesystemCredentials(e),e.preventDefault(),u.find('.manage-column [type="checkbox"]').prop("checked",!1),p.trigger("wp-"+t+"-bulk-"+n,a),a.each(function(e,t){var a=r(t),t=a.parents("tr");"update-selected"!==n||t.hasClass("update")&&!t.find("notice-error").length?o.updates.queue.push({action:s,data:{plugin:t.data("plugin"),slug:t.data("slug")}}):a.prop("checked",!1)}),p.on("wp-plugin-update-success wp-plugin-update-error wp-theme-update-success wp-theme-update-error",function(e,t){var a,s=r('[data-slug="'+t.slug+'"]');"wp-"+t.update+"-update-success"===e.type?l++:(e=t.pluginName||s.find(".column-primary strong").text(),i++,d.push(e+": "+t.errorMessage)),s.find('input[name="checked[]"]:checked').prop("checked",!1),o.updates.adminNotice=o.template("wp-bulk-updates-admin-notice"),o.updates.addAdminNotice({id:"bulk-action-notice",className:"bulk-action-notice",successes:l,errors:i,errorMessages:d,type:t.update}),a=r("#bulk-action-notice").on("click","button",function(){r(this).toggleClass("bulk-action-errors-collapsed").attr("aria-expanded",!r(this).hasClass("bulk-action-errors-collapsed")),a.find(".bulk-action-errors").toggleClass("hidden")}),0<i&&!o.updates.queue.length&&r("html, body").animate({scrollTop:0})}),p.on("wp-updates-notice-added",function(){o.updates.adminNotice=o.template("wp-updates-admin-notice")}),o.updates.queueChecker()}),s.length&&s.attr("aria-describedby","live-search-desc"),s.on("keyup input",_.debounce(function(e,t){var a=r(".plugin-install-search"),s={_ajax_nonce:o.updates.ajaxNonce,s:e.target.value,tab:"search",type:r("#typeselector").val(),pagenow:pagenow},n=location.href.split("?")[0]+"?"+r.param(_.omit(s,["_ajax_nonce","pagenow"]));"keyup"===e.type&&27===e.which&&(e.target.value=""),o.updates.searchTerm===s.s&&"typechange"!==t||(l.empty(),o.updates.searchTerm=s.s,window.history&&window.history.replaceState&&window.history.replaceState(null,"",n),a.length||(a=r('<li class="plugin-install-search" />').append(r("<a />",{class:"current",href:n,text:o.updates.l10n.searchResultsLabel})),r(".wp-filter .filter-links .current").removeClass("current").parents(".filter-links").prepend(a),l.prev("p").remove(),r(".plugins-popular-tags-wrapper").remove()),void 0!==o.updates.searchRequest&&o.updates.searchRequest.abort(),r("body").addClass("loading-content"),o.updates.searchRequest=o.ajax.post("search-install-plugins",s).done(function(e){r("body").removeClass("loading-content"),l.append(e.items),delete o.updates.searchRequest,0===e.count?o.a11y.speak(o.updates.l10n.noPluginsFound):o.a11y.speak(o.updates.l10n.pluginsFound.replace("%d",e.count))}))},500)),a.length&&a.attr("aria-describedby","live-search-desc"),a.on("keyup input",_.debounce(function(e){var s={_ajax_nonce:o.updates.ajaxNonce,s:e.target.value,pagenow:pagenow,plugin_status:"all"};"keyup"===e.type&&27===e.which&&(e.target.value=""),o.updates.searchTerm!==s.s&&(o.updates.searchTerm=s.s,e=_.object(_.compact(_.map(location.search.slice(1).split("&"),function(e){if(e)return e.split("=")}))),s.plugin_status=e.plugin_status||"all",window.history&&window.history.replaceState&&window.history.replaceState(null,"",location.href.split("?")[0]+"?s="+s.s+"&plugin_status="+s.plugin_status),void 0!==o.updates.searchRequest&&o.updates.searchRequest.abort(),u.empty(),r("body").addClass("loading-content"),r(".subsubsub .current").removeClass("current"),o.updates.searchRequest=o.ajax.post("search-plugins",s).done(function(e){var t=r("<span />").addClass("subtitle").html(o.updates.l10n.searchResults.replace("%s",_.escape(s.s))),a=r(".wrap .subtitle");s.s.length?a.length?a.replaceWith(t):r(".wp-header-end").before(t):(a.remove(),r(".subsubsub ."+s.plugin_status+" a").addClass("current")),r("body").removeClass("loading-content"),u.append(e.items),delete o.updates.searchRequest,0===e.count?o.a11y.speak(o.updates.l10n.noPluginsFound):o.a11y.speak(o.updates.l10n.pluginsFound.replace("%d",e.count))}))},500)),p.on("submit",".search-plugins",function(e){e.preventDefault(),r("input.wp-filter-search").trigger("input")}),p.on("click",".try-again",function(e){e.preventDefault(),s.trigger("input")}),r("#typeselector").on("change",function(){var e=r('input[name="s"]');e.val().length&&e.trigger("input","typechange")}),r("#plugin_update_from_iframe").on("click",function(e){var t=window.parent===window?null:window.parent;r.support.postMessage=!!window.postMessage,!1!==r.support.postMessage&&null!==t&&-1===window.parent.location.pathname.indexOf("update-core.php")&&(e.preventDefault(),e={action:"update-plugin",data:{plugin:r(this).data("plugin"),slug:r(this).data("slug")}},t.postMessage(JSON.stringify(e),window.location.origin))}),r("#plugin_install_from_iframe").on("click",function(e){var t=window.parent===window?null:window.parent;r.support.postMessage=!!window.postMessage,!1!==r.support.postMessage&&null!==t&&-1===window.parent.location.pathname.indexOf("index.php")&&(e.preventDefault(),e={action:"install-plugin",data:{slug:r(this).data("slug")}},t.postMessage(JSON.stringify(e),window.location.origin))}),r(window).on("message",function(e){var t,a=e.originalEvent,e=document.location.protocol+"//"+document.location.hostname;if(a.origin===e){try{t=r.parseJSON(a.data)}catch(e){return}if(t&&void 0!==t.action)switch(t.action){case"decrementUpdateCount":o.updates.decrementCount(t.upgradeType);break;case"install-plugin":case"update-plugin":window.tb_remove(),t.data=o.updates._addCallbacks(t.data,t.action),o.updates.queue.push(t),o.updates.queueChecker()}}}),r(window).on("beforeunload",o.updates.beforeunload)})}(jQuery,window.wp,window._wpUpdatesSettings);home/xbodynamge/crosstraining/wp-admin/js/updates.min.js000064400000105561151131455200017440 0ustar00!function(r,o,d){var p=r(document);(o=o||{}).updates={},o.updates.ajaxNonce=d.ajax_nonce,o.updates.l10n=d.l10n,o.updates.searchTerm="",o.updates.shouldRequestFilesystemCredentials=!1,o.updates.filesystemCredentials={ftp:{host:"",username:"",password:"",connectionType:""},ssh:{publicKey:"",privateKey:""},fsNonce:"",available:!1},o.updates.ajaxLocked=!1,o.updates.adminNotice=o.template("wp-updates-admin-notice"),o.updates.queue=[],o.updates.$elToReturnFocusToFromCredentialsModal=void 0,o.updates.addAdminNotice=function(e){var t,a=r(e.selector);delete e.selector,t=o.updates.adminNotice(e),(a=!a.length?r("#"+e.id):a).length?a.replaceWith(t):"customize"===pagenow?r(".customize-themes-notifications").append(t):r(".wrap").find("> h1").after(t),p.trigger("wp-updates-notice-added")},o.updates.ajax=function(e,t){var a={};return o.updates.ajaxLocked?(o.updates.queue.push({action:e,data:t}),r.Deferred()):(o.updates.ajaxLocked=!0,t.success&&(a.success=t.success,delete t.success),t.error&&(a.error=t.error,delete t.error),a.data=_.extend(t,{action:e,_ajax_nonce:o.updates.ajaxNonce,_fs_nonce:o.updates.filesystemCredentials.fsNonce,username:o.updates.filesystemCredentials.ftp.username,password:o.updates.filesystemCredentials.ftp.password,hostname:o.updates.filesystemCredentials.ftp.hostname,connection_type:o.updates.filesystemCredentials.ftp.connectionType,public_key:o.updates.filesystemCredentials.ssh.publicKey,private_key:o.updates.filesystemCredentials.ssh.privateKey}),o.ajax.send(a).always(o.updates.ajaxAlways))},o.updates.ajaxAlways=function(e){e.errorCode&&"unable_to_connect_to_filesystem"===e.errorCode||(o.updates.ajaxLocked=!1,o.updates.queueChecker()),void 0!==e.debug&&window.console&&window.console.log&&_.map(e.debug,function(e){window.console.log(r("<p />").html(e).text())})},o.updates.refreshCount=function(){var e,t=r("#wp-admin-bar-updates"),a=r('a[href="update-core.php"] .update-plugins'),s=r('a[href="plugins.php"] .update-plugins'),n=r('a[href="themes.php"] .update-plugins');t.find(".ab-item").removeAttr("title"),t.find(".ab-label").text(d.totals.counts.total),0===d.totals.counts.total&&t.find(".ab-label").parents("li").remove(),a.each(function(e,t){t.className=t.className.replace(/count-\d+/,"count-"+d.totals.counts.total)}),0<d.totals.counts.total?a.find(".update-count").text(d.totals.counts.total):a.remove(),s.each(function(e,t){t.className=t.className.replace(/count-\d+/,"count-"+d.totals.counts.plugins)}),0<d.totals.counts.total?s.find(".plugin-count").text(d.totals.counts.plugins):s.remove(),n.each(function(e,t){t.className=t.className.replace(/count-\d+/,"count-"+d.totals.counts.themes)}),0<d.totals.counts.total?n.find(".theme-count").text(d.totals.counts.themes):n.remove(),"plugins"===pagenow||"plugins-network"===pagenow?e=d.totals.counts.plugins:"themes"!==pagenow&&"themes-network"!==pagenow||(e=d.totals.counts.themes),0<e?r(".subsubsub .upgrade .count").text("("+e+")"):(r(".subsubsub .upgrade").remove(),r(".subsubsub li:last").html(function(){return r(this).children()}))},o.updates.decrementCount=function(e){d.totals.counts.total=Math.max(--d.totals.counts.total,0),"plugin"===e?d.totals.counts.plugins=Math.max(--d.totals.counts.plugins,0):"theme"===e&&(d.totals.counts.themes=Math.max(--d.totals.counts.themes,0)),o.updates.refreshCount(e)},o.updates.updatePlugin=function(e){var t,a,s;return e=_.extend({success:o.updates.updatePluginSuccess,error:o.updates.updatePluginError},e),"plugins"===pagenow||"plugins-network"===pagenow?(a=(t=r('tr[data-plugin="'+e.plugin+'"]')).find(".update-message").removeClass("notice-error").addClass("updating-message notice-warning").find("p"),s=o.updates.l10n.pluginUpdatingLabel.replace("%s",t.find(".plugin-title strong").text())):"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||(a=(t=r(".plugin-card-"+e.slug)).find(".update-now").addClass("updating-message"),s=o.updates.l10n.pluginUpdatingLabel.replace("%s",a.data("name")),t.removeClass("plugin-card-update-failed").find(".notice.notice-error").remove()),a.html()!==o.updates.l10n.updating&&a.data("originaltext",a.html()),a.attr("aria-label",s).text(o.updates.l10n.updating),p.trigger("wp-plugin-updating",e),o.updates.ajax("update-plugin",e)},o.updates.updatePluginSuccess=function(e){var t,a,s;"plugins"===pagenow||"plugins-network"===pagenow?(a=(t=r('tr[data-plugin="'+e.plugin+'"]').removeClass("update").addClass("updated")).find(".update-message").removeClass("updating-message notice-warning").addClass("updated-message notice-success").find("p"),s=t.find(".plugin-version-author-uri").html().replace(e.oldVersion,e.newVersion),t.find(".plugin-version-author-uri").html(s)):"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||(a=r(".plugin-card-"+e.slug).find(".update-now").removeClass("updating-message").addClass("button-disabled updated-message")),a.attr("aria-label",o.updates.l10n.pluginUpdatedLabel.replace("%s",e.pluginName)).text(o.updates.l10n.pluginUpdated),o.a11y.speak(o.updates.l10n.updatedMsg,"polite"),o.updates.decrementCount("plugin"),p.trigger("wp-plugin-update-success",e)},o.updates.updatePluginError=function(e){var t,a,s;o.updates.isValidResponse(e,"update")&&(o.updates.maybeHandleCredentialError(e,"update-plugin")||(s=o.updates.l10n.updateFailed.replace("%s",e.errorMessage),"plugins"===pagenow||"plugins-network"===pagenow?((a=(e.plugin?r('tr[data-plugin="'+e.plugin+'"]'):r('tr[data-slug="'+e.slug+'"]')).find(".update-message")).removeClass("updating-message notice-warning").addClass("notice-error").find("p").html(s),e.pluginName?a.find("p").attr("aria-label",o.updates.l10n.pluginUpdateFailedLabel.replace("%s",e.pluginName)):a.find("p").removeAttr("aria-label")):"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||((t=r(".plugin-card-"+e.slug).addClass("plugin-card-update-failed").append(o.updates.adminNotice({className:"update-message notice-error notice-alt is-dismissible",message:s}))).find(".update-now").text(o.updates.l10n.updateFailedShort).removeClass("updating-message"),e.pluginName?t.find(".update-now").attr("aria-label",o.updates.l10n.pluginUpdateFailedLabel.replace("%s",e.pluginName)):t.find(".update-now").removeAttr("aria-label"),t.on("click",".notice.is-dismissible .notice-dismiss",function(){setTimeout(function(){t.removeClass("plugin-card-update-failed").find(".column-name a").focus(),t.find(".update-now").attr("aria-label",!1).text(o.updates.l10n.updateNow)},200)})),o.a11y.speak(s,"assertive"),p.trigger("wp-plugin-update-error",e)))},o.updates.installPlugin=function(e){var t=r(".plugin-card-"+e.slug),a=t.find(".install-now");return e=_.extend({success:o.updates.installPluginSuccess,error:o.updates.installPluginError},e),(a="import"===pagenow?r('[data-slug="'+e.slug+'"]'):a).html()!==o.updates.l10n.installing&&a.data("originaltext",a.html()),a.addClass("updating-message").attr("aria-label",o.updates.l10n.pluginInstallingLabel.replace("%s",a.data("name"))).text(o.updates.l10n.installing),o.a11y.speak(o.updates.l10n.installingMsg,"polite"),t.removeClass("plugin-card-install-failed").find(".notice.notice-error").remove(),p.trigger("wp-plugin-installing",e),o.updates.ajax("install-plugin",e)},o.updates.installPluginSuccess=function(e){var t=r(".plugin-card-"+e.slug).find(".install-now");t.removeClass("updating-message").addClass("updated-message installed").attr("aria-label",o.updates.l10n.pluginInstalledLabel.replace("%s",e.pluginName)).text(o.updates.l10n.pluginInstalled),t.hasClass("button-primary")?t.addClass("button-primary-disabled"):t.addClass("button-disabled"),o.a11y.speak(o.updates.l10n.installedMsg,"polite"),p.trigger("wp-plugin-install-success",e),e.activateUrl&&setTimeout(function(){t.removeClass("install-now installed button-primary-disabled button-secondary-disabled button-disabled updated-message").addClass("activate-now").attr("href",e.activateUrl).attr("aria-label",o.updates.l10n.activatePluginLabel.replace("%s",e.pluginName)).text(e.activateLabel||o.updates.l10n.activatePlugin)},1e3)},o.updates.installPluginError=function(e){var t,a=r(".plugin-card-"+e.slug),s=a.find(".install-now");o.updates.isValidResponse(e,"install")&&(o.updates.maybeHandleCredentialError(e,"install-plugin")||(t=o.updates.l10n.installFailed.replace("%s",e.errorMessage),a.addClass("plugin-card-update-failed").append('<div class="notice notice-error notice-alt is-dismissible"><p>'+t+"</p></div>"),a.on("click",".notice.is-dismissible .notice-dismiss",function(){setTimeout(function(){a.removeClass("plugin-card-update-failed").find(".column-name a").focus()},200)}),s.removeClass("updating-message").addClass("button-disabled").attr("aria-label",o.updates.l10n.pluginInstallFailedLabel.replace("%s",s.data("name"))).text(o.updates.l10n.installFailedShort),o.a11y.speak(t,"assertive"),p.trigger("wp-plugin-install-error",e)))},o.updates.installImporterSuccess=function(e){o.updates.addAdminNotice({id:"install-success",className:"notice-success is-dismissible",message:o.updates.l10n.importerInstalledMsg.replace("%s",e.activateUrl+"&from=import")}),r('[data-slug="'+e.slug+'"]').removeClass("install-now updating-message").addClass("activate-now").attr({href:e.activateUrl+"&from=import","aria-label":o.updates.l10n.activateImporterLabel.replace("%s",e.pluginName)}).text(o.updates.l10n.activateImporter),o.a11y.speak(o.updates.l10n.installedMsg,"polite"),p.trigger("wp-importer-install-success",e)},o.updates.installImporterError=function(e){var t=o.updates.l10n.installFailed.replace("%s",e.errorMessage),a=r('[data-slug="'+e.slug+'"]'),s=a.data("name");o.updates.isValidResponse(e,"install")&&(o.updates.maybeHandleCredentialError(e,"install-plugin")||(o.updates.addAdminNotice({id:e.errorCode,className:"notice-error is-dismissible",message:t}),a.removeClass("updating-message").text(o.updates.l10n.installNow).attr("aria-label",o.updates.l10n.installNowLabel.replace("%s",s)),o.a11y.speak(t,"assertive"),p.trigger("wp-importer-install-error",e)))},o.updates.deletePlugin=function(e){var t=r('[data-plugin="'+e.plugin+'"]').find(".row-actions a.delete");return e=_.extend({success:o.updates.deletePluginSuccess,error:o.updates.deletePluginError},e),t.html()!==o.updates.l10n.deleting&&t.data("originaltext",t.html()).text(o.updates.l10n.deleting),o.a11y.speak(o.updates.l10n.deleting,"polite"),p.trigger("wp-plugin-deleting",e),o.updates.ajax("delete-plugin",e)},o.updates.deletePluginSuccess=function(i){r('[data-plugin="'+i.plugin+'"]').css({backgroundColor:"#faafaa"}).fadeOut(350,function(){var e=r("#bulk-action-form"),t=r(".subsubsub"),a=r(this),s=e.find("thead th:not(.hidden), thead td").length,n=o.template("item-deleted-row"),l=d.plugins;a.hasClass("plugin-update-tr")||a.after(n({slug:i.slug,plugin:i.plugin,colspan:s,name:i.pluginName})),a.remove(),-1!==_.indexOf(l.upgrade,i.plugin)&&(l.upgrade=_.without(l.upgrade,i.plugin),o.updates.decrementCount("plugin")),-1!==_.indexOf(l.inactive,i.plugin)&&(l.inactive=_.without(l.inactive,i.plugin),l.inactive.length?t.find(".inactive .count").text("("+l.inactive.length+")"):t.find(".inactive").remove()),-1!==_.indexOf(l.active,i.plugin)&&(l.active=_.without(l.active,i.plugin),l.active.length?t.find(".active .count").text("("+l.active.length+")"):t.find(".active").remove()),-1!==_.indexOf(l.recently_activated,i.plugin)&&(l.recently_activated=_.without(l.recently_activated,i.plugin),l.recently_activated.length?t.find(".recently_activated .count").text("("+l.recently_activated.length+")"):t.find(".recently_activated").remove()),l.all=_.without(l.all,i.plugin),l.all.length?t.find(".all .count").text("("+l.all.length+")"):(e.find(".tablenav").css({visibility:"hidden"}),t.find(".all").remove(),e.find("tr.no-items").length||e.find("#the-list").append('<tr class="no-items"><td class="colspanchange" colspan="'+s+'">'+o.updates.l10n.noPlugins+"</td></tr>"))}),o.a11y.speak(o.updates.l10n.pluginDeleted,"polite"),p.trigger("wp-plugin-delete-success",i)},o.updates.deletePluginError=function(e){var t,a=o.template("item-update-row"),s=o.updates.adminNotice({className:"update-message notice-error notice-alt",message:e.errorMessage}),n=e.plugin?(t=r('tr.inactive[data-plugin="'+e.plugin+'"]')).siblings('[data-plugin="'+e.plugin+'"]'):(t=r('tr.inactive[data-slug="'+e.slug+'"]')).siblings('[data-slug="'+e.slug+'"]');o.updates.isValidResponse(e,"delete")&&(o.updates.maybeHandleCredentialError(e,"delete-plugin")||(n.length?(n.find(".notice-error").remove(),n.find(".plugin-update").append(s)):t.addClass("update").after(a({slug:e.slug,plugin:e.plugin||e.slug,colspan:r("#bulk-action-form").find("thead th:not(.hidden), thead td").length,content:s})),p.trigger("wp-plugin-delete-error",e)))},o.updates.updateTheme=function(e){var t;return e=_.extend({success:o.updates.updateThemeSuccess,error:o.updates.updateThemeError},e),(t="themes-network"===pagenow?r('[data-slug="'+e.slug+'"]').find(".update-message").removeClass("notice-error").addClass("updating-message notice-warning").find("p"):"customize"===pagenow?((t=r('[data-slug="'+e.slug+'"].notice').removeClass("notice-large")).find("h3").remove(),(t=t.add(r("#customize-control-installed_theme_"+e.slug).find(".update-message"))).addClass("updating-message").find("p")):((t=r("#update-theme").closest(".notice").removeClass("notice-large")).find("h3").remove(),(t=t.add(r('[data-slug="'+e.slug+'"]').find(".update-message"))).addClass("updating-message").find("p"))).html()!==o.updates.l10n.updating&&t.data("originaltext",t.html()),o.a11y.speak(o.updates.l10n.updatingMsg,"polite"),t.text(o.updates.l10n.updating),p.trigger("wp-theme-updating",e),o.updates.ajax("update-theme",e)},o.updates.updateThemeSuccess=function(e){var t,a,s=r("body.modal-open").length,n=r('[data-slug="'+e.slug+'"]'),l={className:"updated-message notice-success notice-alt",message:o.updates.l10n.themeUpdated};"customize"===pagenow?((n=r(".updating-message").siblings(".theme-name")).length&&(a=n.html().replace(e.oldVersion,e.newVersion),n.html(a)),t=r(".theme-info .notice").add(o.customize.control("installed_theme_"+e.slug).container.find(".theme").find(".update-message"))):"themes-network"===pagenow?(t=n.find(".update-message"),a=n.find(".theme-version-author-uri").html().replace(e.oldVersion,e.newVersion),n.find(".theme-version-author-uri").html(a)):(t=r(".theme-info .notice").add(n.find(".update-message")),(s?r(".load-customize:visible"):n.find(".load-customize")).focus()),o.updates.addAdminNotice(_.extend({selector:t},l)),o.a11y.speak(o.updates.l10n.updatedMsg,"polite"),o.updates.decrementCount("theme"),p.trigger("wp-theme-update-success",e),s&&"customize"!==pagenow&&r(".theme-info .theme-author").after(o.updates.adminNotice(l))},o.updates.updateThemeError=function(e){var t,a=r('[data-slug="'+e.slug+'"]'),s=o.updates.l10n.updateFailed.replace("%s",e.errorMessage);o.updates.isValidResponse(e,"update")&&(o.updates.maybeHandleCredentialError(e,"update-theme")||("customize"===pagenow&&(a=o.customize.control("installed_theme_"+e.slug).container.find(".theme")),"themes-network"===pagenow?t=a.find(".update-message "):(t=r(".theme-info .notice").add(a.find(".notice")),(r("body.modal-open").length?r(".load-customize:visible"):a.find(".load-customize")).focus()),o.updates.addAdminNotice({selector:t,className:"update-message notice-error notice-alt is-dismissible",message:s}),o.a11y.speak(s,"polite"),p.trigger("wp-theme-update-error",e)))},o.updates.installTheme=function(e){var t=r('.theme-install[data-slug="'+e.slug+'"]');return e=_.extend({success:o.updates.installThemeSuccess,error:o.updates.installThemeError},e),t.addClass("updating-message"),t.parents(".theme").addClass("focus"),t.html()!==o.updates.l10n.installing&&t.data("originaltext",t.html()),t.text(o.updates.l10n.installing).attr("aria-label",o.updates.l10n.themeInstallingLabel.replace("%s",t.data("name"))),o.a11y.speak(o.updates.l10n.installingMsg,"polite"),r('.install-theme-info, [data-slug="'+e.slug+'"]').removeClass("theme-install-failed").find(".notice.notice-error").remove(),p.trigger("wp-theme-installing",e),o.updates.ajax("install-theme",e)},o.updates.installThemeSuccess=function(e){var t,a=r(".wp-full-overlay-header, [data-slug="+e.slug+"]");p.trigger("wp-theme-install-success",e),t=a.find(".button-primary").removeClass("updating-message").addClass("updated-message disabled").attr("aria-label",o.updates.l10n.themeInstalledLabel.replace("%s",e.themeName)).text(o.updates.l10n.themeInstalled),o.a11y.speak(o.updates.l10n.installedMsg,"polite"),setTimeout(function(){e.activateUrl&&t.attr("href",e.activateUrl).removeClass("theme-install updated-message disabled").addClass("activate").attr("aria-label",o.updates.l10n.activateThemeLabel.replace("%s",e.themeName)).text(o.updates.l10n.activateTheme),e.customizeUrl&&t.siblings(".preview").replaceWith(function(){return r("<a>").attr("href",e.customizeUrl).addClass("button load-customize").text(o.updates.l10n.livePreview)})},1e3)},o.updates.installThemeError=function(e){var t,a=o.updates.l10n.installFailed.replace("%s",e.errorMessage),s=o.updates.adminNotice({className:"update-message notice-error notice-alt",message:a});o.updates.isValidResponse(e,"install")&&(o.updates.maybeHandleCredentialError(e,"install-theme")||("customize"===pagenow?(p.find("body").hasClass("modal-open")?(t=r('.theme-install[data-slug="'+e.slug+'"]'),r(".theme-overlay .theme-info").prepend(s)):(t=r('.theme-install[data-slug="'+e.slug+'"]')).closest(".theme").addClass("theme-install-failed").append(s),o.customize.notifications.remove("theme_installing")):p.find("body").hasClass("full-overlay-active")?(t=r('.theme-install[data-slug="'+e.slug+'"]'),r(".install-theme-info").prepend(s)):t=r('[data-slug="'+e.slug+'"]').removeClass("focus").addClass("theme-install-failed").append(s).find(".theme-install"),t.removeClass("updating-message").attr("aria-label",o.updates.l10n.themeInstallFailedLabel.replace("%s",t.data("name"))).text(o.updates.l10n.installFailedShort),o.a11y.speak(a,"assertive"),p.trigger("wp-theme-install-error",e)))},o.updates.deleteTheme=function(e){var t;return"themes"===pagenow?t=r(".theme-actions .delete-theme"):"themes-network"===pagenow&&(t=r('[data-slug="'+e.slug+'"]').find(".row-actions a.delete")),e=_.extend({success:o.updates.deleteThemeSuccess,error:o.updates.deleteThemeError},e),t&&t.html()!==o.updates.l10n.deleting&&t.data("originaltext",t.html()).text(o.updates.l10n.deleting),o.a11y.speak(o.updates.l10n.deleting,"polite"),r(".theme-info .update-message").remove(),p.trigger("wp-theme-deleting",e),o.updates.ajax("delete-theme",e)},o.updates.deleteThemeSuccess=function(n){var e=r('[data-slug="'+n.slug+'"]');"themes-network"===pagenow&&e.css({backgroundColor:"#faafaa"}).fadeOut(350,function(){var e=r(".subsubsub"),t=r(this),a=d.themes,s=o.template("item-deleted-row");t.hasClass("plugin-update-tr")||t.after(s({slug:n.slug,colspan:r("#bulk-action-form").find("thead th:not(.hidden), thead td").length,name:t.find(".theme-title strong").text()})),t.remove(),t.hasClass("update")&&(a.upgrade--,o.updates.decrementCount("theme")),t.hasClass("inactive")&&(a.disabled--,a.disabled?e.find(".disabled .count").text("("+a.disabled+")"):e.find(".disabled").remove()),e.find(".all .count").text("("+--a.all+")")}),o.a11y.speak(o.updates.l10n.themeDeleted,"polite"),p.trigger("wp-theme-delete-success",n)},o.updates.deleteThemeError=function(e){var t=r('tr.inactive[data-slug="'+e.slug+'"]'),a=r(".theme-actions .delete-theme"),s=o.template("item-update-row"),n=t.siblings("#"+e.slug+"-update"),l=o.updates.l10n.deleteFailed.replace("%s",e.errorMessage),i=o.updates.adminNotice({className:"update-message notice-error notice-alt",message:l});o.updates.maybeHandleCredentialError(e,"delete-theme")||("themes-network"===pagenow?n.length?(n.find(".notice-error").remove(),n.find(".plugin-update").append(i)):t.addClass("update").after(s({slug:e.slug,colspan:r("#bulk-action-form").find("thead th:not(.hidden), thead td").length,content:i})):r(".theme-info .theme-description").before(i),a.html(a.data("originaltext")),o.a11y.speak(l,"assertive"),p.trigger("wp-theme-delete-error",e))},o.updates._addCallbacks=function(e,t){return"import"===pagenow&&"install-plugin"===t&&(e.success=o.updates.installImporterSuccess,e.error=o.updates.installImporterError),e},o.updates.queueChecker=function(){var e;if(!o.updates.ajaxLocked&&o.updates.queue.length)switch((e=o.updates.queue.shift()).action){case"install-plugin":o.updates.installPlugin(e.data);break;case"update-plugin":o.updates.updatePlugin(e.data);break;case"delete-plugin":o.updates.deletePlugin(e.data);break;case"install-theme":o.updates.installTheme(e.data);break;case"update-theme":o.updates.updateTheme(e.data);break;case"delete-theme":o.updates.deleteTheme(e.data)}},o.updates.requestFilesystemCredentials=function(e){!1===o.updates.filesystemCredentials.available&&(e&&!o.updates.$elToReturnFocusToFromCredentialsModal&&(o.updates.$elToReturnFocusToFromCredentialsModal=r(e.target)),o.updates.ajaxLocked=!0,o.updates.requestForCredentialsModalOpen())},o.updates.maybeRequestFilesystemCredentials=function(e){o.updates.shouldRequestFilesystemCredentials&&!o.updates.ajaxLocked&&o.updates.requestFilesystemCredentials(e)},o.updates.keydown=function(e){27===e.keyCode?o.updates.requestForCredentialsModalCancel():9===e.keyCode&&("upgrade"!==e.target.id||e.shiftKey?"hostname"===e.target.id&&e.shiftKey&&(r("#upgrade").focus(),e.preventDefault()):(r("#hostname").focus(),e.preventDefault()))},o.updates.requestForCredentialsModalOpen=function(){var e=r("#request-filesystem-credentials-dialog");r("body").addClass("modal-open"),e.show(),e.find("input:enabled:first").focus(),e.on("keydown",o.updates.keydown)},o.updates.requestForCredentialsModalClose=function(){r("#request-filesystem-credentials-dialog").hide(),r("body").removeClass("modal-open"),o.updates.$elToReturnFocusToFromCredentialsModal&&o.updates.$elToReturnFocusToFromCredentialsModal.focus()},o.updates.requestForCredentialsModalCancel=function(){(o.updates.ajaxLocked||o.updates.queue.length)&&(_.each(o.updates.queue,function(e){p.trigger("credential-modal-cancel",e)}),o.updates.ajaxLocked=!1,o.updates.queue=[],o.updates.requestForCredentialsModalClose())},o.updates.showErrorInCredentialsForm=function(e){var t=r("#request-filesystem-credentials-form");t.find(".notice").remove(),t.find("#request-filesystem-credentials-title").after('<div class="notice notice-alt notice-error"><p>'+e+"</p></div>")},o.updates.credentialError=function(e,t){e=o.updates._addCallbacks(e,t),o.updates.queue.unshift({action:t,data:e}),o.updates.filesystemCredentials.available=!1,o.updates.showErrorInCredentialsForm(e.errorMessage),o.updates.requestFilesystemCredentials()},o.updates.maybeHandleCredentialError=function(e,t){return!(!o.updates.shouldRequestFilesystemCredentials||!e.errorCode||"unable_to_connect_to_filesystem"!==e.errorCode)&&(o.updates.credentialError(e,t),!0)},o.updates.isValidResponse=function(e,t){var a,s=o.updates.l10n.unknownError;if(_.isObject(e)&&!_.isFunction(e.always))return!0;switch(_.isString(e)&&"-1"===e?s=o.updates.l10n.nonceError:_.isString(e)?s=e:void 0!==e.readyState&&0===e.readyState?s=o.updates.l10n.connectionError:_.isString(e.responseText)&&""!==e.responseText?s=e.responseText:_.isString(e.statusText)&&(s=e.statusText),t){case"update":a=o.updates.l10n.updateFailed;break;case"install":a=o.updates.l10n.installFailed;break;case"delete":a=o.updates.l10n.deleteFailed}return s=s.replace(/<[\/a-z][^<>]*>/gi,""),a=a.replace("%s",s),o.updates.addAdminNotice({id:"unknown_error",className:"notice-error is-dismissible",message:_.escape(a)}),o.updates.ajaxLocked=!1,o.updates.queue=[],r(".button.updating-message").removeClass("updating-message").removeAttr("aria-label").prop("disabled",!0).text(o.updates.l10n.updateFailedShort),r(".updating-message:not(.button):not(.thickbox)").removeClass("updating-message notice-warning").addClass("notice-error").find("p").removeAttr("aria-label").text(a),o.a11y.speak(a,"assertive"),!1},o.updates.beforeunload=function(){if(o.updates.ajaxLocked)return o.updates.l10n.beforeunload},r(function(){var l=r("#plugin-filter"),u=r("#bulk-action-form"),e=r("#request-filesystem-credentials-form"),t=r("#request-filesystem-credentials-dialog"),a=r(".plugins-php .wp-filter-search"),s=r(".plugin-install-php .wp-filter-search");(d=_.extend(d,window._wpUpdatesItemCounts||{})).totals&&o.updates.refreshCount(),o.updates.shouldRequestFilesystemCredentials=0<t.length,t.on("submit","form",function(e){e.preventDefault(),o.updates.filesystemCredentials.ftp.hostname=r("#hostname").val(),o.updates.filesystemCredentials.ftp.username=r("#username").val(),o.updates.filesystemCredentials.ftp.password=r("#password").val(),o.updates.filesystemCredentials.ftp.connectionType=r('input[name="connection_type"]:checked').val(),o.updates.filesystemCredentials.ssh.publicKey=r("#public_key").val(),o.updates.filesystemCredentials.ssh.privateKey=r("#private_key").val(),o.updates.filesystemCredentials.fsNonce=r("#_fs_nonce").val(),o.updates.filesystemCredentials.available=!0,o.updates.ajaxLocked=!1,o.updates.queueChecker(),o.updates.requestForCredentialsModalClose()}),t.on("click",'[data-js-action="close"], .notification-dialog-background',o.updates.requestForCredentialsModalCancel),e.on("change",'input[name="connection_type"]',function(){r("#ssh-keys").toggleClass("hidden","ssh"!==r(this).val())}).change(),p.on("credential-modal-cancel",function(e,t){var a,s=r(".updating-message");"import"===pagenow?s.removeClass("updating-message"):"plugins"===pagenow||"plugins-network"===pagenow?"update-plugin"===t.action?a=r('tr[data-plugin="'+t.data.plugin+'"]').find(".update-message"):"delete-plugin"===t.action&&(a=r('[data-plugin="'+t.data.plugin+'"]').find(".row-actions a.delete")):"themes"===pagenow||"themes-network"===pagenow?"update-theme"===t.action?a=r('[data-slug="'+t.data.slug+'"]').find(".update-message"):"delete-theme"===t.action&&"themes-network"===pagenow?a=r('[data-slug="'+t.data.slug+'"]').find(".row-actions a.delete"):"delete-theme"===t.action&&"themes"===pagenow&&(a=r(".theme-actions .delete-theme")):a=s,a&&a.hasClass("updating-message")&&(void 0===(s=a.data("originaltext"))&&(s=r("<p>").html(a.find("p").data("originaltext"))),a.removeClass("updating-message").html(s),"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||("update-plugin"===t.action?a.attr("aria-label",o.updates.l10n.pluginUpdateNowLabel.replace("%s",a.data("name"))):"install-plugin"===t.action&&a.attr("aria-label",o.updates.l10n.pluginInstallNowLabel.replace("%s",a.data("name"))))),o.a11y.speak(o.updates.l10n.updateCancel,"polite")}),u.on("click","[data-plugin] .update-link",function(e){var t=r(e.target),a=t.parents("tr");e.preventDefault(),t.hasClass("updating-message")||t.hasClass("button-disabled")||(o.updates.maybeRequestFilesystemCredentials(e),o.updates.$elToReturnFocusToFromCredentialsModal=a.find(".check-column input"),o.updates.updatePlugin({plugin:a.data("plugin"),slug:a.data("slug")}))}),l.on("click",".update-now",function(e){var t=r(e.target);e.preventDefault(),t.hasClass("updating-message")||t.hasClass("button-disabled")||(o.updates.maybeRequestFilesystemCredentials(e),o.updates.updatePlugin({plugin:t.data("plugin"),slug:t.data("slug")}))}),l.on("click",".install-now",function(e){var t=r(e.target);e.preventDefault(),t.hasClass("updating-message")||t.hasClass("button-disabled")||(o.updates.shouldRequestFilesystemCredentials&&!o.updates.ajaxLocked&&(o.updates.requestFilesystemCredentials(e),p.on("credential-modal-cancel",function(){r(".install-now.updating-message").removeClass("updating-message").text(o.updates.l10n.installNow),o.a11y.speak(o.updates.l10n.updateCancel,"polite")})),o.updates.installPlugin({slug:t.data("slug")}))}),p.on("click",".importer-item .install-now",function(e){var t=r(e.target),a=r(this).data("name");e.preventDefault(),t.hasClass("updating-message")||(o.updates.shouldRequestFilesystemCredentials&&!o.updates.ajaxLocked&&(o.updates.requestFilesystemCredentials(e),p.on("credential-modal-cancel",function(){t.removeClass("updating-message").text(o.updates.l10n.installNow).attr("aria-label",o.updates.l10n.installNowLabel.replace("%s",a)),o.a11y.speak(o.updates.l10n.updateCancel,"polite")})),o.updates.installPlugin({slug:t.data("slug"),pagenow:pagenow,success:o.updates.installImporterSuccess,error:o.updates.installImporterError}))}),u.on("click","[data-plugin] a.delete",function(e){var t=r(e.target).parents("tr");e.preventDefault(),window.confirm(o.updates.l10n.aysDeleteUninstall.replace("%s",t.find(".plugin-title strong").text()))&&(o.updates.maybeRequestFilesystemCredentials(e),o.updates.deletePlugin({plugin:t.data("plugin"),slug:t.data("slug")}))}),p.on("click",".themes-php.network-admin .update-link",function(e){var t=r(e.target),a=t.parents("tr");e.preventDefault(),t.hasClass("updating-message")||t.hasClass("button-disabled")||(o.updates.maybeRequestFilesystemCredentials(e),o.updates.$elToReturnFocusToFromCredentialsModal=a.find(".check-column input"),o.updates.updateTheme({slug:a.data("slug")}))}),p.on("click",".themes-php.network-admin a.delete",function(e){var t=r(e.target).parents("tr");e.preventDefault(),window.confirm(o.updates.l10n.aysDelete.replace("%s",t.find(".theme-title strong").text()))&&(o.updates.maybeRequestFilesystemCredentials(e),o.updates.deleteTheme({slug:t.data("slug")}))}),u.on("click",'[type="submit"]:not([name="clear-recent-list"])',function(e){var t,s,n=r(e.target).siblings("select").val(),a=u.find('input[name="checked[]"]:checked'),l=0,i=0,d=[];switch(pagenow){case"plugins":case"plugins-network":t="plugin";break;case"themes-network":t="theme";break;default:return}if(!a.length)return e.preventDefault(),r("html, body").animate({scrollTop:0}),o.updates.addAdminNotice({id:"no-items-selected",className:"notice-error is-dismissible",message:o.updates.l10n.noItemsSelected});switch(n){case"update-selected":s=n.replace("selected",t);break;case"delete-selected":if(!window.confirm("plugin"===t?o.updates.l10n.aysBulkDelete:o.updates.l10n.aysBulkDeleteThemes))return void e.preventDefault();s=n.replace("selected",t);break;default:return}o.updates.maybeRequestFilesystemCredentials(e),e.preventDefault(),u.find('.manage-column [type="checkbox"]').prop("checked",!1),p.trigger("wp-"+t+"-bulk-"+n,a),a.each(function(e,t){var a=r(t),t=a.parents("tr");"update-selected"!==n||t.hasClass("update")&&!t.find("notice-error").length?o.updates.queue.push({action:s,data:{plugin:t.data("plugin"),slug:t.data("slug")}}):a.prop("checked",!1)}),p.on("wp-plugin-update-success wp-plugin-update-error wp-theme-update-success wp-theme-update-error",function(e,t){var a,s=r('[data-slug="'+t.slug+'"]');"wp-"+t.update+"-update-success"===e.type?l++:(e=t.pluginName||s.find(".column-primary strong").text(),i++,d.push(e+": "+t.errorMessage)),s.find('input[name="checked[]"]:checked').prop("checked",!1),o.updates.adminNotice=o.template("wp-bulk-updates-admin-notice"),o.updates.addAdminNotice({id:"bulk-action-notice",className:"bulk-action-notice",successes:l,errors:i,errorMessages:d,type:t.update}),a=r("#bulk-action-notice").on("click","button",function(){r(this).toggleClass("bulk-action-errors-collapsed").attr("aria-expanded",!r(this).hasClass("bulk-action-errors-collapsed")),a.find(".bulk-action-errors").toggleClass("hidden")}),0<i&&!o.updates.queue.length&&r("html, body").animate({scrollTop:0})}),p.on("wp-updates-notice-added",function(){o.updates.adminNotice=o.template("wp-updates-admin-notice")}),o.updates.queueChecker()}),s.length&&s.attr("aria-describedby","live-search-desc"),s.on("keyup input",_.debounce(function(e,t){var a=r(".plugin-install-search"),s={_ajax_nonce:o.updates.ajaxNonce,s:e.target.value,tab:"search",type:r("#typeselector").val(),pagenow:pagenow},n=location.href.split("?")[0]+"?"+r.param(_.omit(s,["_ajax_nonce","pagenow"]));"keyup"===e.type&&27===e.which&&(e.target.value=""),o.updates.searchTerm===s.s&&"typechange"!==t||(l.empty(),o.updates.searchTerm=s.s,window.history&&window.history.replaceState&&window.history.replaceState(null,"",n),a.length||(a=r('<li class="plugin-install-search" />').append(r("<a />",{class:"current",href:n,text:o.updates.l10n.searchResultsLabel})),r(".wp-filter .filter-links .current").removeClass("current").parents(".filter-links").prepend(a),l.prev("p").remove(),r(".plugins-popular-tags-wrapper").remove()),void 0!==o.updates.searchRequest&&o.updates.searchRequest.abort(),r("body").addClass("loading-content"),o.updates.searchRequest=o.ajax.post("search-install-plugins",s).done(function(e){r("body").removeClass("loading-content"),l.append(e.items),delete o.updates.searchRequest,0===e.count?o.a11y.speak(o.updates.l10n.noPluginsFound):o.a11y.speak(o.updates.l10n.pluginsFound.replace("%d",e.count))}))},500)),a.length&&a.attr("aria-describedby","live-search-desc"),a.on("keyup input",_.debounce(function(e){var s={_ajax_nonce:o.updates.ajaxNonce,s:e.target.value,pagenow:pagenow,plugin_status:"all"};"keyup"===e.type&&27===e.which&&(e.target.value=""),o.updates.searchTerm!==s.s&&(o.updates.searchTerm=s.s,e=_.object(_.compact(_.map(location.search.slice(1).split("&"),function(e){if(e)return e.split("=")}))),s.plugin_status=e.plugin_status||"all",window.history&&window.history.replaceState&&window.history.replaceState(null,"",location.href.split("?")[0]+"?s="+s.s+"&plugin_status="+s.plugin_status),void 0!==o.updates.searchRequest&&o.updates.searchRequest.abort(),u.empty(),r("body").addClass("loading-content"),r(".subsubsub .current").removeClass("current"),o.updates.searchRequest=o.ajax.post("search-plugins",s).done(function(e){var t=r("<span />").addClass("subtitle").html(o.updates.l10n.searchResults.replace("%s",_.escape(s.s))),a=r(".wrap .subtitle");s.s.length?a.length?a.replaceWith(t):r(".wp-header-end").before(t):(a.remove(),r(".subsubsub ."+s.plugin_status+" a").addClass("current")),r("body").removeClass("loading-content"),u.append(e.items),delete o.updates.searchRequest,0===e.count?o.a11y.speak(o.updates.l10n.noPluginsFound):o.a11y.speak(o.updates.l10n.pluginsFound.replace("%d",e.count))}))},500)),p.on("submit",".search-plugins",function(e){e.preventDefault(),r("input.wp-filter-search").trigger("input")}),p.on("click",".try-again",function(e){e.preventDefault(),s.trigger("input")}),r("#typeselector").on("change",function(){var e=r('input[name="s"]');e.val().length&&e.trigger("input","typechange")}),r("#plugin_update_from_iframe").on("click",function(e){var t=window.parent===window?null:window.parent;r.support.postMessage=!!window.postMessage,!1!==r.support.postMessage&&null!==t&&-1===window.parent.location.pathname.indexOf("update-core.php")&&(e.preventDefault(),e={action:"update-plugin",data:{plugin:r(this).data("plugin"),slug:r(this).data("slug")}},t.postMessage(JSON.stringify(e),window.location.origin))}),r("#plugin_install_from_iframe").on("click",function(e){var t=window.parent===window?null:window.parent;r.support.postMessage=!!window.postMessage,!1!==r.support.postMessage&&null!==t&&-1===window.parent.location.pathname.indexOf("index.php")&&(e.preventDefault(),e={action:"install-plugin",data:{slug:r(this).data("slug")}},t.postMessage(JSON.stringify(e),window.location.origin))}),r(window).on("message",function(e){var t,a=e.originalEvent,e=document.location.protocol+"//"+document.location.hostname;if(a.origin===e){try{t=r.parseJSON(a.data)}catch(e){return}if(t&&void 0!==t.action)switch(t.action){case"decrementUpdateCount":o.updates.decrementCount(t.upgradeType);break;case"install-plugin":case"update-plugin":window.tb_remove(),t.data=o.updates._addCallbacks(t.data,t.action),o.updates.queue.push(t),o.updates.queueChecker()}}}),r(window).on("beforeunload",o.updates.beforeunload)})}(jQuery,window.wp,window._wpUpdatesSettings);