PageSourceSearch

https://candidat.qapa.fr/front-applicant/assets/change-password-Bn0eoSip.js

js qapa.fr collected 2026-09-24 09:35:51 UTC 5,468 bytes, 2 lines download raw bytes

1import{a as q,bD as x,a8 as k,c as g,bm as H,F as O,bE as z,a7 as M,o as v,e7 as G,ai as W,a1 as j,u as d,w as o,b as l,V as T,e as E,ar as A,k as F,h as p,ah as K,t as R,av as L,n as X,Y as y,am as m,ay as C,az as $,z as Y,A as I,aK as J,C as Q,D as Z,B as ee,ad as ae,ac as se,ab as te,aD as oe,aE as ne,R as le,r as re,ao as de,X as ie,e8 as ue}from"./index-DljKbM12.js";import{a as ce,_ as me}from"./qapa-loadable-box.vue_vue_type_script_setup_true_lang--KWUCzzu.js";const pe=q({inheritAttrs:!1,__name:"qapa-password-confirmation-text-field",props:z({label:{},disabled:{type:Boolean},required:{type:Boolean,default:!1},clearable:{type:Boolean},placeholder:{},prependInnerIcon:{},hint:{},persistentHint:{type:Boolean},hideDetails:{},errorMessages:{},variant:{},density:{},color:{},iconColor:{},duplicatePassword:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const i=x(e,"modelValue"),u=e,{t:h}=k(),r=M(()=>[c=>c!==u.duplicatePassword?h("ui.text-fields.password-confirmation.mismatch"):!0]);return(c,w)=>(v(),g(H,O(c.$attrs,{type:"password","validate-on":"blur",rules:r.value,required:e.required,modelValue:i.value,"onUpdate:modelValue":w[0]||(w[0]=f=>i.value=f),label:e.label,disabled:e.disabled,clearable:e.clearable,placeholder:e.placeholder,"prepend-inner-icon":e.prependInnerIcon,hint:e.hint,"persistent-hint":e.persistentHint,"hide-details":e.hideDetails,"error-messages":e.errorMessages}),null,16,["rules","required","modelValue","label","disabled","clearable","placeholder","prepend-inner-icon","hint","persistent-hint","hide-details","error-messages"]))}});var D=(e=>(e.CHANGE="CHANGE",e.INITIAL_SETUP="INITIAL_SETUP",e.RESET="RESET",e))(D||{});const we=q({__name:"change-password-widget",props:{resetToken:{},oldPasswordRequired:{type:Boolean,default:!0}},emits:["changePasswordSuccess"],setup(e,{emit:i}){const u=e,h=i,{t:r}=k(),{blurActiveElement:c}=L(),{changePassword:w}=G(),f=X("form"),b=y(""),n=y(""),P=y("");async function S(){if((await f.value.validate()).valid)try{const a={newPassword:n.value};return u.resetToken?a.resetToken=u.resetToken:u.oldPasswordRequired&&(a.oldPassword=b.value),await w(a),h("changePasswordSuccess"),m.success()}catch(a){return C(a,$.UPDATE_PASSWORD_INCORRECT)?m.failure(r("base.change-password-widget.ancien-mot-de-passe-errone")):C(a,$.UPDATE_PASSWORD_RESET_EXPIRED)?m.failure(r("base.change-password-widget.demande-mot-de-passe-expire")):m.failureWithError(a,r("base.change-password-widget.une-erreur-est-survenue"))}else return m.failure()}return(a,s)=>{const _=W;return v(),g(_,{ref_key:"form",ref:f,onSubmit:j(d(c),["prevent"])},{default:o(()=>[l(T,{justify:"center"},{default:o(()=>[l(E,{cols:"12",lg:"6"},{default:o(()=>[e.oldPasswordRequired?(v(),g(d(A),{key:0,modelValue:b.value,"onUpdate:modelValue":s[0]||(s[0]=t=>b.value=t),class:"old-password-field",label:a.$t("base.change-password-widget.ancien-mot-de-passe-label"),icon:"mdi-lock-question",hint:a.$t("base.change-password-widget.votre-mot-de-passe-hint"),required:"","disable-validation":""},null,8,["modelValue","label","hint"])):F("",!0),s[3]||(s[3]=p()),l(d(A),{modelValue:n.value,"onUpdate:modelValue":s[1]||(s[1]=t=>n.value=t),class:"password-field",label:a.$t("base.change-password-widget.nouveau-mot-de-passe-label"),icon:"mdi-lock-question",hint:a.$t("base.change-password-widget.votre-mot-de-passe-hint"),required:""},null,8,["modelValue","label","hint"]),s[4]||(s[4]=p()),l(d(pe),{modelValue:P.value,"onUpdate:modelValue":s[2]||(s[2]=t=>P.value=t),duplicatePassword:n.value,class:"password-confirmation-field",label:a.$t("base.change-password-widget.confirmez-votre-mot-de-label"),icon:"mdi-lock-question",required:""},null,8,["modelValue","duplicatePassword","label"])]),_:1}),s[5]||(s[5]=p()),l(E,{cols:"12"},{default:o(()=>[l(T,null,{default:o(()=>[l(E,{class:"text-center"},{default:o(()=>[l(d(K),{class:"change-password-button",type:"submit",action:S},{default:o(()=>[p(R(a.$t("common.valider")),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["onSubmit"])}}}),ge=q({name:"ChangePassword",__name:"change-password",setup(e){Y({meta:[{name:"robots",content:"noindex, nofollow"}]});const{t:i}=k(),u=ie(),h=re(),r=ee(),{header:c}=ae(),w=de(ue),f=I(J,r),b=I(Q,r),n=y(null),P=D,S=M(()=>{var t;return(t=u.query.reset_token)==null?void 0:t.toString()});async function a(){var t;(t=b.applicant)!=null&&t.id&&(n.value=await w.getResetPasswordContext(b.applicant.id,S.value))}async function s(){try{await a()}catch{return m.failure()}return m.success()}function _(){oe.$emit(ne.SUCCESS,i("base.views.change-password.changement-pris-en-compte")),h.push({name:le.DASHBOARD_MISSIONS})}return Z(async()=>{c.value.name=i("common.mot-de-passe")}),(t,V)=>{const B=ce,N=me,U=se;return v(),g(U,{divider:"","x-lg-and-up-margin":""},{title:o(()=>[p(R(t.$t("base.views.change-password.changez-votre-mot-de-passe")),1)]),default:o(()=>
1[V[0]||(V[0]=p()),l(N,{"network-available":d(f).networkAvailable,load:s},te({_:2},[n.value?{name:"content",fn:o(()=>[n.value.mode==d(P).RESET&&!n.value.isValid?(v(),g(B,{key:0},{default:o(()=>[p(R(t.$t("base.views.change-password.demande-expiree")),1)]),_:1})):(v(),g(we,{key:1,class:"reset-password-widget",onChangePasswordSuccess:_,resetToken:S.value,oldPasswordRequired:n.value.mode==d(P).CHANGE},null,8,["resetToken","oldPasswordRequired"]))]),key:"0"}:void 0]),1032,["network-available"])]),_:1})}}});export{ge as default};
2//# sourceMappingURL=change-password-Bn0eoSip.js.map

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.