PageSourceSearch

https://www.villes-marraines.org/_app/immutable/pages/forgot-password.svelte-ffe04e74.js

js villes-marraines.org collected 2026-10-02 18:23:37 UTC 5,383 bytes, 3 lines download raw bytes

1import{S as F,i as M,s as $,a as C,w as G,l as b,a5 as Q,h as n,c as P,x as Y,m as y,n as g,p as h,b as A,y as H,M as m,f as J,t as K,B as X,O,o as Z,a6 as W,r as R,u as D,ai as T,N as L,G as x,E as ee,v as te}from"../chunks/index-9d21ee06.js";import"../chunks/navigation-9622c79d.js";import{g as ae}from"../chunks/directus-67cc6168.js";import{p as se}from"../chunks/stores-94133fdb.js";/* empty css                                                          */import{s as ie,f as re,c as le}from"../chunks/yup-locales.esm-7bcb5b91.js";import{y as oe,a as ne}from"../chunks/index-c917b73b.js";import{P as ce}from"../chunks/PageHeader-ae6128d2.js";import{c as me,a as pe}from"../chunks/array-d6ba6ceb.js";import"../chunks/singletons-4cd74d60.js";import"../chunks/sdk.bundler-ee151e5a.js";import"../chunks/_commonjsHelpers-64ec9a40.js";import"../chunks/index-8bd05f59.js";const{document:U}=W;function ue(c){let t,e,l,i,r,o,_,p,E,u,a,v,k,w,V,I,d=c[2].email&&q(c);return{c(){t=b("form"),e=b("div"),l=b("label"),i=R("Votre adresse email "),r=b("sup"),o=R("*"),_=C(),p=b("input"),E=C(),d&&d.c(),u=C(),a=b("div"),v=C(),k=b("button"),w=R("Envoyer"),this.h()},l(s){t=y(s,"FORM",{});var f=g(t);e=y(f,"DIV",{class:!0});var S=g(e);l=y(S,"LABEL",{for:!0});var N=g(l);i=D(N,"Votre adresse email "),r=y(N,"SUP",{});var j=g(r);o=D(j,"*"),j.forEach(n),N.forEach(n),_=P(S),p=y(S,"INPUT",{id:!0,name:!0,class:!0}),E=P(S),d&&d.l(S),S.forEach(n),u=P(f),a=y(f,"DIV",{class:!0,"data-sitekey":!0,"data-callback":!0,"data-size":!0});var B=g(a);B.forEach(n),v=P(f),k=y(f,"BUTTON",{type:!0,class:!0});var z=g(k);w=D(z,"Envoyer"),z.forEach(n),f.forEach(n),this.h()},h(){h(l,"for","email"),h(p,"id","email"),h(p,"name","email"),h(p,"class","input"),h(e,"class","field"),h(a,"class","g-recaptcha"),h(a,"data-sitekey",c[3]),h(a,"data-callback","onReCaptchaValid"),h(a,"data-size","invisible"),h(k,"type","submit"),h(k,"class","button is-primary")},m(s,f){A(s,t,f),m(t,e),m(e,l),m(l,i),m(l,r),m(r,o),m(e,_),m(e,p),T(p,c[1].email),m(e,E),d&&d.m(e,null),m(t,u),m(t,a),m(t,v),m(t,k),m(k,w),V||(I=[L(p,"keyup",c[6]),L(p,"change",c[6]),L(p,"input",c[8]),L(t,"submit",c[7])],V=!0)},p(s,f){f&2&&p.value!==s[1].email&&T(p,s[1].email),s[2].email?d?d.p(s,f):(d=q(s),d.c(),d.m(e,null)):d&&(d.d(1),d=null)},d(s){s&&n(t),d&&d.d(),V=!1,x(I)}}}function de(c){let t,e,l;return{c(){t=b("div"),e=b("p"),l=R(`Votre demande a bien \xE9t\xE9 prise en compte. Vous allez recevoir un email avec un lien de
2						r\xE9initialisation de mot de passe...`),this.h()},l(i){t=y(i,"DIV",{class:!0});var r=g(t);e=y(r,"P",{});var o=g(e);l=D(o,`Votre demande a bien \xE9t\xE9 prise en compte. Vous allez recevoir un email avec un lien de
3						r\xE9initialisation de mot de passe...`),o.forEach(n),r.forEach(n),this.h()},h(){h(t,"class","notification is-warning")},m(i,r){A(i,t,r),m(t,e),m(e,l)},p:ee,d(i){i&&n(t)}}}function q(c){let t,e,l=c[2].email+"",i;return{c(){t=b("p"),e=b("small"),i=R(l),this.h()},l(r){t=y(r,"P",{});var o=g(t);e=y(o,"SMALL",{class:!0});var _=g(e);i=D(_,l),_.forEach(n),o.forEach(n),this.h()},h(){h(e,"class","has-text-danger")},m(r,o){A(r,t,o),m(t,e),m(e,i)},p(r,o){o&4&&l!==(l=r[2].email+"")&&te(i,l)},d(r){r&&n(t)}}}function fe(c){let t,e,l,i,r,o,_;e=new ce({props:{title:"R\xE9initialiser son mot de passe",containerclass:"is-max-desktop"}});function p(a,v){return a[0]?de:ue}let E=p(c),u=E(c);return{c(){t=C(),G(e.$$.fragment),l=C(),i=b("section"),r=b("div"),o=b("div"),u.c(),this.h()},l(a){Q('[data-svelte="svelte-pymms9"]',U.head).forEach(n),t=P(a),Y(e.$$.fragment,a),l=P(a),i=y(a,"SECTION",{class:!0});var k=g(i);r=y(k,"DIV",{class:!0});var w=g(r);o=y(w,"DIV",{class:!0});var V=g(o);u.l(V),V.forEach(n),w.forEach(n),k.forEach(n),this.h()},h(){U.title="R\xE9initialiser mon mot de passe",h(o,"class",""),h(r,"class","container is-max-desktop"),h(i,"class","section")},m(a,v){A(a,t,v),H(e,a,v),A(a,l,v),A(a,i,v),m(i,r),m(r,o),u.m(o,null),_=!0},p(a,[v]){E===(E=p(a))&&u?u.p(a,v):(u.d(1),u=E(a),u&&(u.c(),u.m(o,null)))},i(a){_||(J(e.$$.fragment,a),_=!0)},o(a){K(e.$$.fragment,a),_=!1},d(a){a&&n(t),X(e,a),a&&n(l),a&&n(i),u.d()}}}function he(c,t,e){let l,i,r;O(c,se,s=>e(9,l=s));const o="6Lce9-kfAAAAANVFmXzYYCBObTchZQPo5-Qbe2G5";let _=!1;oe(ne);const p="https://admin.villes-marraines.org";ie(re);const{form:E,errors:u,state:a,handleChange:v,handleSubmit:k}=le({initialValues:{email:""},validationSchema:me().shape({email:pe().email().test("","Aucun compte n'existe avec cette adresse email...",async s=>{if(s){let f=await V(s);return f=await f.json(),f}}).required("Ce champ est obligatoire")}),onSubmit:async s=>{I()}});O(c,E,s=>e(1,i=s)),O(c,u,s=>e(2,r=s));function w(s){return new Promise(function(f,S){grecaptcha.getResponse()!==""&&I(),grecaptcha.reset()})}async function V(s){return await ae(),await fetch(p+"/auth2/checkuser?email="+s)}async function I(){fetch(p+"/auth/password/request",{method:"post",body:JSON.stringify({email:i.email,reset_url:"https://"+l.url.hostname+l.url.port+"/reset-password"}),headers:{"content-type":"application/json"}}).then(s=>{e(0,_=!0)})}Z(()=>{window.onReCaptchaValid=w;var s=document.createElement("script");s.type="text/javascript",s.src="https://www.google.com/recaptcha/api.js",s.async=!0,document.head.appendChild(s)});function d(){i.email=this.value,E.set(i)}return[_,i,r,o,E,u,v,k,d]}class Ie extends F{constructor(t){super(),M(this,t,he,fe,$,{})}}export{Ie as default};

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.