/*! This file is auto-generated */
!function(r){var e,a,n,t,i,o,d,l,p,c,u=!1,h=wp.i18n.__;function f(){"function"==typeof zxcvbn?(!a.val()||c.hasClass("is-open")?(a.val(a.data("pw")),a.trigger("pwupdate")):b(),g(),1!==parseInt(o.data("start-masked"),10)?a.attr("type","text"):o.trigger("click"),r("#pw-weak-text-label").text(h("Confirm use of weak password"))):setTimeout(f,50)}function w(s){o.attr({"aria-label":h(s?"Show password":"Hide password")}).find(".text").text(h(s?"Show":"Hide")).end().find(".dashicons").removeClass(s?"dashicons-hidden":"dashicons-visibility").addClass(s?"dashicons-visibility":"dashicons-hidden")}function m(s,e,a){var n=r("
");n.addClass("notice inline"),n.addClass("notice-"+(e?"success":"error")),n.text(r(r.parseHTML(a)).text()).wrapInner(""),s.prop("disabled",e),s.siblings(".notice").remove(),s.before(n)}function v(){var s;e=r(".user-pass1-wrap, .user-pass-wrap"),r(".user-pass2-wrap").hide(),l=r("#submit, #wp-submit").on("click",function(){u=!1}),d=l.add(" #createusersub"),t=r(".pw-weak"),(i=t.find(".pw-checkbox")).on("change",function(){d.prop("disabled",!i.prop("checked"))}),(a=r("#pass1")).length?(p=a.val(),1===parseInt(a.data("reveal"),10)&&f(),a.on("input pwupdate",function(){a.val()!==p&&(p=a.val(),a.removeClass("short bad good strong"),g())})):a=r("#user_pass"),n=r("#pass2").on("input",function(){0]*>/gi,""),n[s].length&&-1===r.inArray(e,a)&&(a.push(e),r("",{text:e}).appendTo(i)))})}),i.on("change",function(){var s;n===t&&(s=r.trim(this.value)||e,o.text(s))})),s=r("#color-picker"),a=r("#colors-css"),n=r("input#user_id").val(),t=r('input[name="checkuser_id"]').val(),s.on("click.colorpicker",".color-option",function(){var s,e=r(this);if(!e.hasClass("selected")&&(e.siblings(".selected").removeClass("selected"),e.addClass("selected").find('input[type="radio"]').prop("checked",!0),n===t)){if((a=0===a.length?r('').appendTo("head"):a).attr("href",e.children(".css_url").val()),"undefined"!=typeof wp&&wp.svgPainter){try{s=r.parseJSON(e.children(".icon_colors").val())}catch(s){}s&&(wp.svgPainter.setColors(s),wp.svgPainter.paint())}r.post(ajaxurl,{action:"save-user-color-scheme",color_scheme:e.children('input[name="admin_color"]').val(),nonce:r("#color-nonce").val()}).done(function(s){s.success&&r("body").removeClass(s.data.previousScheme).addClass(s.data.currentScheme)})}}),v(),r("#generate-reset-link").on("click",function(){var e=r(this),s={user_id:userProfileL10n.user_id,nonce:userProfileL10n.nonce};e.parent().find(".notice-error").remove();s=wp.ajax.post("send-password-reset",s);s.done(function(s){m(e,!0,s)}),s.fail(function(s){m(e,!1,s)})})}),r("#destroy-sessions").on("click",function(s){var e=r(this);wp.ajax.post("destroy-sessions",{nonce:r("#_wpnonce").val(),user_id:r("#user_id").val()}).done(function(s){e.prop("disabled",!0),e.siblings(".notice").remove(),e.before('
")}),s.preventDefault()}),window.generatePassword=f,r(window).on("beforeunload",function(){if(!0===u)return h("Your new password has not been saved.")})}(jQuery);