1import{a as Z,b as __,c as e_,d as t_,e as n_,f as a_,g as S_}from"./chunk-W7CTW6XX.js";import{a as q}from"./chunk-QSZQDWP4.js";import{a as Y}from"./chunk-HHVBHG3K.js";import{c as V}from"./chunk-BRXHBXE3.js";import{c as Q}from"./chunk-A6D5T2EF.js";import{Db as l,Dd as z,Fb as x,Hd as j,Lc as F,Mc as B,O as M,Ob as t,Pb as i,Qb as d,R as b,Rb as E,Sb as c,Ub as y,Uc as U,Yb as o,bc as L,cc as f,da as K,eb as s,h as W,kb as m,o as v,oc as O,qa as k,ra as $,rb as H,rc as p,sb as G,sc as R,tc as P,td as J,ud as X,wb as g}from"./chunk-TVZWCV2O.js";var o_=W(a_(),1),r_=W(S_(),1);function l_(e,n){e&1&&(t(0,"div",24),d(1,"svg-icon",25),t(2,"div")(3,"div",26),o(4,4),i(),E(5),o(6,5),c(),i()());}function C_(e,n){if(e&1&&(t(0,"div",24),d(1,"svg-icon",27),t(2,"div")(3,"div",26),o(4,6),i(),E(5),o(6,7),c(),p(7),F(8,"number"),E(9),o(10,8),c(),i()()),e&2){let _=f(2);s(7),P(" ",B(8,1,_.hibpResults),"\xA0");}}function d_(e,n){e&1&&(t(0,"div",24),d(1,"svg-icon",28),t(2,"div")(3,"div",26),o(4,9),i(),E(5),o(6,10),c(),i()());}function E_(e,n){e&1&&d(0,"svg-icon",27);}function c_(e,n){e&1&&d(0,"svg-icon",33);}function p_(e,n){e&1&&d(0,"svg-icon",28);}function N_(e,n){if(e&1&&(t(0,"div",29),g(1,E_,1,0,"svg-icon",30)(2,c_,1,0,"svg-icon",31)(3,p_,1,0,"svg-icon",32),t(4,"div")(5,"div",26),p(6),i(),p(7),i()()),e&2){let _=n.$implicit;s(),l("ngIf",_.level=="warning"),s(),l("ngIf",_.level=="notice"),s(),l("ngIf",_.level=="achievement"),s(3),R(_.name),s(),P(" ",_.message," ");}}function T_(e,n){e&1&&(t(0,"div",24),d(1,"svg-icon",28),t(2,"div")(3,"div",26),o(4,11),i(),E(5),o(6,12),c(),i()());}function g_(e,n){if(e&1&&(E(0),t(1,"div",17)(2,"div"),o(3,1),i(),t(4,"div",18),p(5),i(),t(6,"div"),o(7,2),i()(),t(8,"div",19),g(9,l_,7,0,"div",20)(10,C_,11,3,"div",20)(11,d_,7,0,"div",20),t(12,"div",21),E(13),o(14,3),c(),p(15,": "),t(16,"a",22),p(17,"Have I Been Pwned"),i()()(),t(18,"div",19),g(19,N_,8,5,"div",23)(20,T_,7,0,"div",20),i(),c()),e&2){let _=f();s(5),R(_.hsimpResult.time),s(4),l("ngIf",_.loadingHibp),s(),l("ngIf",!_.loadingHibp&&_.hibpResults>0),s(),l("ngIf",!_.loadingHibp&&_.hibpResults==0),s(8),l("ngForOf",_.hsimpResult.checks),s(),l("ngIf",_.hsimpResult.checks.length==0);}}var i_=class e{constructor(n,_,S){this.http=n;this.changeDetector=_;this.config=S;this.hsimp=(0,o_.default)({calculation:{calcs:4e10,characterSets:e_},time:{periods:Z[this.config.locale],namedNumbers:__[this.config.locale],forever:this.messages.forever,instantly:this.messages.instantly},checks:{dictionary:[""],patterns:t_,messages:n_}}),this.passwordChange.pipe(M(400),b()).subscribe(r=>{this.level=0,r==""?(this.hsimpResult=null,this.hibpResults=0):(this.checkHibp(r),this.hsimpResult=this.hsimp(r)),this.changeDetector.detectChanges();});}hsimp;hsimpResult;passwordChange=new v();loadingHibp=!1;hibpResults=0;level=0;messages={forever:"per sempre",instantly:"0 secondi"};checkHibp(n){this.loadingHibp=!0,this.hibpResults=0;let _=(0,r_.default)(n).toUpperCase(),S=_.substring(0,5),r=_.substring(5);this.http.get("https://api.pwnedpasswords.com/range/"+S,{responseType:"text"}).subscribe(T=>{let N=T.split(` 2`);for(let C of N)if(C.startsWith(r)){this.hibpResults=Number(C.split(":")[1]);break;}this.hibpResults>0||this.hsimpResult.checks.filter(C=>C.level=="warning").length>0?this.level=1:this.hsimpResult.checks.filter(C=>C.level=="notice").length>0?this.level=2:this.level=3,this.loadingHibp=!1,this.changeDetector.detectChanges();});}ngOnInit(){}static ɵfac=function(_){return new(_||e)(m(V),m(U),m(Q));};static ɵcmp=H({type:e,selectors:[["password-check"]],hostAttrs:[1,"block","w-full"],standalone:!1,decls:5,vars:7,consts:()=>{let n;n="Passwort eingeben";let _;_="Ein Computer ben\xF6tigt ungef\xE4hr";let S;S="um Ihr Passwort zu knacken.";let r;r="Quelle";let T;T="Passwort Leaks";let N;N="Wir \xFCberpr\xFCfen, ob Ihr Passwort in der Vergangenheit geleakt wurde...";let C;C="Passwort Leaks";let h;h="Achtung: Ihr Passwort ist bereits";let A;A="mal in Passwort-Leaks aufgetaucht. Es sollte nicht mehr verwendet werden.";let u;u="Passwort Leaks";let D;D="Ihr Passwort wurde in keinem bekannten Passwort-Leak gefunden.";let I;I="Sonderzeichen und Nummern";let w;return w="Ihr Passwort enth\xE4lt Sonderzeichen und Nummern.",[["password",""],_,S,r,T,N,C,h,A,u,D,I,w,[1,"w-full","max-w-lg","mx-auto"],[1,"card","border","border-transparent"],["type","password","placeholder",n,1,"input-text","input-text-xl","border-0",3,"keyup"],[4,"ngIf"],[1,"card","mt-5","p-5","text-tool"],[1,"text-center","text-neutral-900","font-bold","my-5","text-3xl"],[1,"card","mt-5","p-5","pb-2","text-tool"],["class","flex",4,"ngIf"],[1,"mt-3","text-tool-sm","text-right","text-neutral-400"],["href","https://haveibeenpwned.com/Passwords","target","_blank"],["class","mt-text flex",4,"ngFor","ngForOf"],[1,"flex"],["width","18","height","18","icon","search",1,"mr-3","pt-1"],[1,"font-bold"],["width","18","height","18","icon","cross-sign",1,"text-red","mr-3","pt-1"],["width","18","height","18","icon","check-done",1,"text-green","mr-3","pt-1"],[1,"mt-text","flex"],["width","18","height","18","icon","cross-sign","class","text-red mr-3 pt-1",4,"ngIf"],["width","18","height","18","icon","minus-sign","class","mr-3 pt-1",4,"ngIf"],["width","18","height","18","icon","check-done","class","text-green mr-3 pt-1",4,"ngIf"],["width","18","height","18","icon","minus-sign",1,"mr-3","pt-1"]];},template:function(_,S){if(_&1){let r=y();t(0,"div",13)(1,"div",14)(2,"input",15,0),L("keyup",function(){k(r);let N=O(3);return $(S.passwordChange.next(N.value));}),i()(),g(4,g_,21,6,"ng-container",16),i();}if(_&2){let r=O(3);s(),x("!border-red",S.level==1)("!border-yellow",S.level==2)("!border-green",S.level==3),s(3),l("ngIf",r&&S.hsimpResult);}},dependencies:[J,X,q,z],encapsulation:2});},s_=class e{static ɵfac=function(_){return new(_||e)();};static ɵmod=G({type:e});static ɵinj=K({imports:[j,Y]});};export{i_ as PasswordCheckComponent,s_ as PasswordCheckModule};/**i18n:5e5c29eb5a2b8b7d81c7cb256105db2252984439abfadc9fbcc9b15c9774eb6b*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.