var l=function(i){return i[i.Easy=0]="Easy",i[i.Medium=1]="Medium",i[i.Demanding=2]="Demanding",i}(l||{});var f=class{static getPasswordEntropy(e){if(!e||e.length===0)return 0;let n=this.poolSize(e);return n>0?e.length*Math.log(n)/Math.log(2):0}static getKeyspace(e,n,t){let a=0;for(let u of e)if(t.value.includes(u)){a=n;break}for(let u of e){let c=t.value.indexOf(u);for(;c!==-1;)t.value=t.value.slice(0,c)+t.value.slice(c+1),c=t.value.indexOf(u)}return a}static poolSize(e){let n=0,t=0;return t+=this.getKeyspace(new Set("abcdefghijklmnopqrstuvwxyz"),26,{value:e}),t===0&&(n=26),t+=this.getKeyspace(new Set("ABCDEFGHIJKLMNOPQRSTUVWXYZ"),26+n,{value:e}),t+=this.getKeyspace(new Set("0123456789"),10,{value:e}),e.length>0&&(t+=24),t}static calcEntropyComplexity(e){return e>=100?l.Demanding:e>=50?l.Medium:l.Easy}};export{l as a,f as b};
