1import{s as Ne,f as be,v as Oe,w as Ve,g as k,c as Z,l as A,e as $e,h as y,i as M,C as se,d as G,m as j,k as w,D as ke,x as ze}from"../chunks/scheduler.0c9d5a23.js";import{S as Fe,i as Ze,d as R,q as ye,v as Ge,j as Q,k as U,e as u,g as N,a as b,o as v,m as X,t as O,c as Le,b as V,l as Y,h as He}from"../chunks/index.388509fb.js";import{g as Je}from"../chunks/globals.7f7f1b26.js";import{j as we,a as Ee}from"../chunks/firebase-config.23b0a144.js";import{g as ie}from"../chunks/navigation.56522dbb.js";import{l as Be}from"../chunks/auth.0ef75e9c.js";import{u as le}from"../chunks/account.S.0bdb8ece.js";import{B as ce}from"../chunks/Button.9ead15fa.js";import{I as ue}from"../chunks/Input.db33f770.js";import{C as me}from"../chunks/ConfirmationAlert.db7f34b9.js";const Ce=n=>{let e={};const t=["email","password"],r=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return n[t[0]]?r.test(n[t[0]])||(e[t[0]]="El email no es válido"):e[t[0]]="El email es necesario para entrar a la cuenta",n[t[1]]?n[t[1]].length<6&&(e[t[1]]="La contraseña es muy corta"):e[t[1]]="No has escrito tu contraseña",Object.keys(e).length===0?{may_submit:!0}:{...e,may_submit:!1}};const{console:Ke}=Je,E="src/routes/login/candidates/+page.svelte";function Re(n){let e;const t={c:function(){e=A("Email")},l:function(o){e=j(o,"Email")},m:function(o,a){b(o,e,a)},d:function(o){o&&u(e)}};return R("SvelteRegisterBlock",{block:t,id:Re.name,type:"slot",source:"(58:4) <Input className='mt15' name='email' type='text' hideBorders='right left' placeholder='Escribe tu email...' specialProps={{casing: 'lower', labelWidth: labelWidths}} bind:value={values.email} error={errors.email} {forceTouch}>",ctx:n}),t}function Se(n){let e;const t={c:function(){e=A("Contraseña")},l:function(o){e=j(o,"Contraseña")},m:function(o,a){b(o,e,a)},d:function(o){o&&u(e)}};return R("SvelteRegisterBlock",{block:t,id:Se.name,type:"slot",source:"(70:4) <Input className='mb15' name='password' type='password' hideBorders='top right left' placeholder='...y tu contraseña' specialProps={{labelWidth: labelWidths}} bind:value={values.password} error={errors.password} {forceTouch}>",ctx:n}),t}function Te(n){let e;const t={c:function(){e=A("Olvidé mi contraseña")},l:function(o){e=j(o,"Olvidé mi contraseña")},m:function(o,a){b(o,e,a)},d:function(o){o&&u(e)}};return R("SvelteRegisterBlock",{block:t,id:Te.name,type:"slot",source:"(83:8) <Button color={errors.email ? 'disabled' : 'ghost'} on:action={handleRecovery}>",ctx:n}),t}function Ie(n){let e;const t={c:function(){e=A("Entrar")},l:function(o){e=j(o,"Entrar")},m:function(o,a){b(o,e,a)},d:function(o){o&&u(e)}};return R("SvelteRegisterBlock",{block:t,id:Ie.name,type:"slot",source:"(104:4) <Button color={errors.may_submit ? '' : 'disabled'} specialProps={{block: true, size: 'thick'}} on:action={handleSubmit}>",ctx:n}),t}function Pe(n){let e,t;e=new me({props:{acceptText:"Entendido",$$slots:{default:[je]},$$scope:{ctx:n}},$$inline:!0}),e.$on("accept",n[11]);const r={c:function(){Q(e.$$.fragment)},l:function(a){U(e.$$.fragment,a)},m:function(a,f){X(e,a,f),t=!0},p:function(a,f){const c={};f&16384&&(c.$$scope={dirty:f,ctx:a}),e.$set(c)},i:function(a){t||(V(e.$$.fragment,a),t=!0)},o:function(a){O(e.$$.fragment,a),t=!1},d:function(a){Y(e,a)}};return R("SvelteRegisterBlock",{block:r,id:Pe.name,type:"if",source:"(118:35) ",ctx:n}),r}function Ae(n){let e,t;e=new me({props:{acceptText:"Entendido",$$slots:{default:[qe]},$$scope:{ctx:n}},$$inline:!0}),e.$on("accept",n[10]);const r={c:function(){Q(e.$$.fragment)},l:function(a){U(e.$$.fragment,a)},m:function(a,f){X(e,a,f),t=!0},p:function(a,f){const c={};f&16384&&(c.$$scope={dirty:f,ctx:a}),e.$set(c)},i:function(a){t||(V(e.$$.fragment,a),t=!0)},o:function(a){O(e.$$.fragment,a),t=!1},d:function(a){Y(e,a)}};
1return R("SvelteRegisterBlock",{block:r,id:Ae.name,type:"if",source:"(112:0) {#if pop === 'recovery_sent'}",ctx:n}),r}function je(n){let e;const t={c:function(){e=A("Ocurrió un error. Inténtalo más tarde.")},l:function(o){e=j(o,"Ocurrió un error. Inténtalo más tarde.")},m:function(o,a){b(o,e,a)},d:function(o){o&&u(e)}};return R("SvelteRegisterBlock",{block:t,id:je.name,type:"slot",source:"(119:4) <ConfirmationAlert acceptText='Entendido' on:accept={() => pop = null}>",ctx:n}),t}function qe(n){let e,t,r,o;const a={c:function(){e=A("Te enviamos un mail con el link para reestablecer tu contraseña. Si no lo ves en tu bandeja de entrada, revisa en spam."),t=k("br"),r=k("br"),o=A("El mail caduca después de 30 min., asà que ingresa lo más pronto posible."),this.h()},l:function(c){e=j(c,"Te enviamos un mail con el link para reestablecer tu contraseña. Si no lo ves en tu bandeja de entrada, revisa en spam."),t=y(c,"BR",{}),r=y(c,"BR",{}),o=j(c,"El mail caduca después de 30 min., asà que ingresa lo más pronto posible."),this.h()},h:function(){w(t,E,115,127,3546),w(r,E,115,131,3550)},m:function(c,m){b(c,e,m),b(c,t,m),b(c,r,m),b(c,o,m)},p:ze,d:function(c){c&&(u(e),u(t),u(r),u(o))}};return R("SvelteRegisterBlock",{block:a,id:qe.name,type:"slot",source:"(113:4) <ConfirmationAlert acceptText='Entendido' on:accept={() => pop = null}>",ctx:n}),a}function fe(n){let e,t,r="Iniciar sesión para candidatos",o,a,f,c,m,q,S,d,h,L,$,x,B,te="aquÃ",ee,T,s,re,C,de="Aviso de privacidad",ne,z,I,oe,p,_,H,ae;function We(g){n[8](g)}let pe={className:"mt15",name:"email",type:"text",hideBorders:"right left",placeholder:"Escribe tu email...",specialProps:{casing:"lower",labelWidth:n[4]},error:n[3].email,forceTouch:n[1],$$slots:{default:[Re]},$$scope:{ctx:n}};n[0].email!==void 0&&(pe.value=n[0].email),a=new ue({props:pe,$$inline:!0}),be.push(()=>ye(a,"value",We));function De(g){n[9](g)}let _e={className:"mb15",name:"password",type:"password",hideBorders:"top right left",placeholder:"...y tu contraseña",specialProps:{labelWidth:n[4]},error:n[3].password,forceTouch:n[1],$$slots:{default:[Se]},$$scope:{ctx:n}};n[0].password!==void 0&&(_e.value=n[0].password),m=new ue({props:_e,$$inline:!0}),be.push(()=>ye(m,"value",De)),h=new ce({props:{color:n[3].email?"disabled":"ghost",$$slots:{default:[Te]},$$scope:{ctx:n}},$$inline:!0}),h.$on("action",n[6]),I=new ce({props:{color:n[3].may_submit?"":"disabled",specialProps:{block:!0,size:"thick"},$$slots:{default:[Ie]},$$scope:{ctx:n}},$$inline:!0}),I.$on("action",n[5]);const he=[Ae,Pe],W=[];function ge(g,i){return g[2]==="recovery_sent"?0:g[2]==="recovery_error"?1:-1}~(p=ge(n))&&(_=W[p]=he[p](n));const ve={c:function(){e=k("div"),t=k("div"),t.textContent=r,o=Z(),Q(a.$$.fragment),c=Z(),Q(m.$$.fragment),S=Z(),d=k("div"),Q(h.$$.fragment),L=Z(),$=k("div"),x=A("Si todavÃa no tienes una cuenta, te puedes registrar "),B=k("a"),B.textContent=te,ee=Z(),T=k("div"),s=k("span"),re=A(`Al dar clic en "entrar" aceptas el 2 `),C=k("a"),C.textContent=de,ne=Z(),z=k("div"),Q(I.$$.fragment),oe=Z(),_&&_.c(),H=$e(),this.h()},l:function(i){e=y(i,"DIV",{});var l=M(e);t=y(l,"DIV",{class:!0,"data-svelte-h":!0}),se(t)!=="svelte-cge0g3"&&(t.textContent=r),o=G(l),U(a.$$.fragment,l),c=G(l),U(m.$$.fragment,l),S=G(l),d=y(l,"DIV",{class:!0});var D=M(d);U(h.$$.fragment,D),D.forEach(u),L=G(l),$=y(l,"DIV",{class:!0});var P=M($);x=j(P,"Si todavÃa no tienes una cuenta, te puedes registrar "),B=y(P,"A",{href:!0,"data-svelte-h":!0}),se(B)!=="svelte-akrt3n"&&(B.textContent=te),P.forEach(u),ee=G(l),T=y(l,"DIV",{class:!0});var J=M(T);s=y(J,"SPAN",{});var F=M(s);re=j(F,`Al dar clic en "entrar" aceptas el 3 `),C=y(F,"A",{href:!0,target:!0,rel:!0,"data-svelte-h":!0}),se(C)!=="svelte-1hvu025"&&(C.textContent=de),F.forEach(u),J.forEach(u),l.forEach(u),ne=G(i),z=y(i,"DIV",{});var K=M(z);U(I.$$.fragment,K),K.forEach(u),oe=G(i),_&&_.l(i),H=$e(),this.h()},h:function(){N(t,"class","title s-0FlloOTGWoCq"),w(t,E,56,4,1667),N(d,"class","row c12 p15 jcFlex-end"),w(d,E,81,4,2391),N(B,"href","/signup"),w(B,E,89,61,2686),N($,"class","p15"),w($,E,88,4,2607),N(C,"href","https://www.anahuac.mx/mexico/proteccion-de-datos-personales/AvisosdePrivacidad/FeriaEmpleo"),N(C,"target","_blank"),N(C,"rel","noopener noreferrer"),w(C,E,93,12,2824),w(s,E,92,8,2771),N(T,"class","row c12 p--legal p15"),w(T,E,91,4,2728),w(e,E,55,0,1657),w(z,E,102,0,3104)},m:function(i,l){b(i,e,l),v(e,t),v(e,o),X(a,e,null),v(e,c),X(m,e,null),v(e,S),v(e,d),X(h,d,null),v(e,L),v(e,$),v($,x),v($,B),v(e,ee),v(e,T),v(T,s),v(s,re),v(s,C),b(i,ne,l),b(i,z,l),X(I,z,null),b(i,oe,l),~p&&W[p].m(i,l),b(i,H,l),ae=!0},p:function(i,[l]){const D={};l&8&&(D.error=i[3].email),l&2&&(D.forceTouch=i[1]),l&16384&&(D.$$scope={dirty:l,ctx:i}),!f&&l&1&&(f=!0,D.value=i[0].email,ke(()=>f=!1)),a.$set(D);const P={};l&8&&(P.error=i[3].password),l&2&&(P.forceTouch=i[1]),l&16384&&(P.$$scope={dirty:l,ctx:i}),!q&&l&1&&(q=!0,P.value=i[0].password,ke(()=>q=!1)),m.$set(P);const J={};l&8&&(J.color=i[3].email?"disabled":"ghost"),l&16384&&(J.$$scope={dirty:l,ctx:i}),h.$set(J);const F={};l&8&&(F.color=i[3].may_submit?"":"disabled"),l&16384&&(F.$$scope={dirty:l,ctx:i}),I.$set(F);let K=p;p=ge(i),p===K?~p&&W[p].p(i,l):(_&&(He(),O(W[K],1,1,()=>{W[K]=null}),Le()),~p?(_=W[p],_?_.p(i,l):(_=W[p]=he[p](i),_.c()),V(_,1),_.m(H.parentNode,H)):_=null)},i:function(i){ae||(V(a.$$.fragment,i),V(m.$$.fragment,i),V(h.$$.fragment,i),V(I.$$.fragment,i),V(_),ae=!0)},o:function(i){O(a.$$.fragment,i),O(m.$$.fragment,i),O(h.$$.fragment,i),O(I.$$.fragment,i),O(_),ae=!1},d:function(i){i&&(u(e),u(ne),u(z),u(oe),u(H)),Y(a),Y(m),Y(h),Y(I),~p&&W[p].d(i)}};return R("SvelteRegisterBlock",{block:ve,id:fe.name,type:"component",source:"",ctx:n}),ve}function Me(n,e,t){let r,o;Oe(le,"user"),Ve(n,le,s=>t(7,o=s));let{$$slots:a={},$$scope:f}=e;Ge("Page",a,[]);let c={password:"",email:""},m=100,q=!1,S=!1,d=null,h=!1;const L=async()=>
3{if(!S){if(S=!0,r.may_submit){const s=await Be(c.email,c.password);s.success?ie("/loading-user"):s.error&&s.code==="auth/too-many-requests"?t(2,d="many-requests"):s.error&&console.error(s)}else t(1,q=!0);S=!1}},$=async()=>{if(!r.email||h){h=!0;try{await we(Ee,c.email),t(2,d="recovery_sent")}catch(s){console.error(s),t(2,d="recovery_error")}h=!1}},x=[];Object.keys(e).forEach(s=>{!~x.indexOf(s)&&s.slice(0,2)!=="$$"&&s!=="slot"&&Ke.warn(`<Page> was created with unknown prop '${s}'`)});function B(s){n.$$.not_equal(c.email,s)&&(c.email=s,t(0,c))}function te(s){n.$$.not_equal(c.password,s)&&(c.password=s,t(0,c))}const ee=()=>t(2,d=null),T=()=>t(2,d=null);return n.$capture_state=()=>({sendPasswordResetEmail:we,goto:ie,auth:Ee,login:Be,validation:Ce,user:le,Button:ce,Input:ue,ConfirmationAlert:me,values:c,labelWidths:m,forceTouch:q,submiting:S,pop:d,sendingRecovery:h,handleSubmit:L,handleRecovery:$,errors:r,$user:o}),n.$inject_state=s=>{"values"in s&&t(0,c=s.values),"labelWidths"in s&&t(4,m=s.labelWidths),"forceTouch"in s&&t(1,q=s.forceTouch),"submiting"in s&&(S=s.submiting),"pop"in s&&t(2,d=s.pop),"sendingRecovery"in s&&(h=s.sendingRecovery),"errors"in s&&t(3,r=s.errors)},e&&"$$inject"in e&&n.$inject_state(e.$$inject),n.$$.update=()=>{n.$$.dirty&128&&(o==null?void 0:o.user_type)==="candidate"&&ie("/loading-user"),n.$$.dirty&1&&t(3,r=Ce(c))},[c,q,d,r,m,L,$,o,B,te,ee,T]}class rt extends Fe{constructor(e){super(e),Ze(this,e,Me,fe,Ne,{}),R("SvelteRegisterComponent",{component:this,tagName:"Page",options:e,id:fe.name})}}export{rt as component};
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.