!function(l){var a,t,n,i,o,r,d,p,c,u,h,f,v=!1;function w(){"function"==typeof zxcvbn?(n.val()?b():(n.val(n.data("pw")),n.trigger("pwupdate")),k(),1!==parseInt(c.data("start-masked"),10)?t.addClass("show-password"):c.trigger("click"),l("#pw-weak-text-label").html(userProfileL10n.warnWeak)):setTimeout(w,50)}function m(){c.data("toggle",0).attr({"aria-label":userProfileL10n.ariaHide}).find(".text").text(userProfileL10n.hide).end().find(".dashicons").removeClass("dashicons-visibility").addClass("dashicons-hidden"),i.focus(),o.attr("for","pass1-text")}function g(){var e,s;a=l(".user-pass1-wrap"),o=a.find("th label").attr("for","pass1-text"),l(".user-pass2-wrap").hide(),h=l("#submit, #wp-submit").on("click",function(){v=!1}),u=h.add(" #createusersub"),d=l(".pw-weak"),(p=d.find(".pw-checkbox")).change(function(){u.prop("disabled",!p.prop("checked"))}),(n=l("#pass1")).length&&(f=n.val(),t=n.parent(),i=l('').attr({id:"pass1-text",name:"pass1-text",autocomplete:"off"}).addClass(n[0].className).data("pw",n.data("pw")).val(n.val()).on("input",function(){i.val()!==f&&(r.val(i.val()),n.val(i.val()).trigger("pwupdate"),f=i.val())}),n.after(i),1===parseInt(n.data("reveal"),10)&&w(),n.on("input pwupdate",function(){n.val()!==f&&(f=n.val(),i.val()!==f&&i.val(f),n.add(i).removeClass("short bad good strong"),k())})),r=l("#pass2").on("input",function(){0]*>/gi,""),t[e].length&&-1===l.inArray(s,a)&&(a.push(s),l("",{text:s}).appendTo(i)))})}),i.on("change",function(){var e;t===n&&(e=l.trim(this.value)||s,o.text(e))})),e=l("#color-picker"),a=l("#colors-css"),t=l("input#user_id").val(),n=l('input[name="checkuser_id"]').val(),e.on("click.colorpicker",".color-option",function(){var e,s=l(this);if(!s.hasClass("selected")&&(s.siblings(".selected").removeClass("selected"),s.addClass("selected").find('input[type="radio"]').prop("checked",!0),t===n)){if((a=0===a.length?l('').appendTo("head"):a).attr("href",s.children(".css_url").val()),"undefined"!=typeof wp&&wp.svgPainter){try{e=l.parseJSON(s.children(".icon_colors").val())}catch(e){}e&&(wp.svgPainter.setColors(e),wp.svgPainter.paint())}l.post(ajaxurl,{action:"save-user-color-scheme",color_scheme:s.children('input[name="admin_color"]').val(),nonce:l("#color-nonce").val()}).done(function(e){e.success&&l("body").removeClass(e.data.previousScheme).addClass(e.data.currentScheme)})}}),g()}),l("#destroy-sessions").on("click",function(e){var s=l(this);wp.ajax.post("destroy-sessions",{nonce:l("#_wpnonce").val(),user_id:l("#user_id").val()}).done(function(e){s.prop("disabled",!0),s.siblings(".notice").remove(),s.before('")}).fail(function(e){s.siblings(".notice").remove(),s.before('")}),e.preventDefault()}),window.generatePassword=w,l(window).on("beforeunload",function(){if(!0===v)return userProfileL10n.warn})}(jQuery);