'use strict';(function($){$.pwstrength=function(password){let score=0;const symbols='[!,@,#,$,%,^,&,*,?,_,~]';let check=new RegExp('('+symbols+')');let doublecheck=new RegExp('('+'.*'+symbols+'.*'+symbols+')');score+=password.length*4;score+=checkRepetition(1,password).length-password.length;score+=checkRepetition(2,password).length-password.length;score+=checkRepetition(3,password).length-password.length;score+=checkRepetition(4,password).length-password.length;if(password.match(/(.*[0-9].*[0-9].*[0-9])/)){score+=5;} if(password.match(doublecheck)){score+=5;} if(password.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)){score+=10;} if(password.match(/([a-zA-Z])/)&&password.match(/([0-9])/)){score+=15;} if(password.match(check)&&password.match(/([0-9])/)){score+=15;} if(password.match(check)&&password.match(/([a-zA-Z])/)){score+=15;} if(password.match(/^\w+$/)||password.match(/^\d+$/)){score-=10;} return Math.floor(Math.max(Math.min(score,99),0)/ 20);};function checkRepetition(rLen,str){let res='';let repeated=false;for(let i=0;i